Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
pull/1156/head
Michael Richters 3 years ago
parent 216fb72ce5
commit 3d0482f0db
No known key found for this signature in database
GPG Key ID: 1288FD13E4EEF0C0

@ -72,7 +72,7 @@ class AutoShift : public Plugin {
public:
// Basic un-checked constructor
constexpr Categories(uint8_t raw_bits)
explicit constexpr Categories(uint8_t raw_bits)
: raw_bits_(raw_bits) {}
static constexpr Categories letterKeys() {

@ -231,8 +231,8 @@ void Model100::setup() {
void Model100::enableHardwareTestMode() {
// Toggle the programming LEDS on
// TODO PORTD |= (1 << 5);
// TOOD PORTB |= (1 << 0);
// TODO(anyone): PORTD |= (1 << 5);
// TOOD(anyone): PORTB |= (1 << 0);
// Disable the debouncer on the ATTinys
KeyScanner::setKeyscanInterval(2);

@ -108,14 +108,11 @@ uint8_t Model100Side::setLEDSPIFrequency(uint8_t frequency) {
// This method will verify that the device is around and ready to talk.
bool Model100Side::isDeviceAvailable() {
return true;
// if the counter is zero, that's the special value that means "we know it's there"
if (unavailable_device_check_countdown_ == 0) {
// if the counter is zero, that's the special value that means "we know it's there"
return true;
}
// if the time to check counter is 1, check for the device
else if (--unavailable_device_check_countdown_ == 0) {
} else if (--unavailable_device_check_countdown_ == 0) {
// if the time to check counter was 1, check for the device
uint8_t wire_result;
Wire.beginTransmission(addr);
wire_result = Wire.endTransmission();
@ -161,7 +158,7 @@ int Model100Side::readRegister(uint8_t cmd) {
return -1;
}
delayMicroseconds(50); // TODO We may be able to drop this in the future
delayMicroseconds(50); // TODO(anyone): We may be able to drop this in the future
// but will need to verify with correctly
// sized pull-ups on both the left and right
// hands' i2c SDA and SCL lines

Loading…
Cancel
Save