@@ 255,6 255,8 @@ void reset(void)
// this should be called as a result of the HP_RST pin going LO
printf("Reset connection to the main unit\n");
if (DigitalIn(HP_RST).read() == 0) {
+ byescreen_timer.detach(); // cancel a "poweroff", if any
+
if (hp == NULL) {
printf("setup HP communication handler\r\n");
hp = new HPSerial(HP_TX, HP_RX);
@@ 335,8 337,12 @@ void mainloop()
if ((keycode == KC_SHIFT) && (key.keyevent == KEY_PRESSED))
{
- shift = true;
- dsp->set_flag_status(0x0E, true);
+ // toggle the shift indicator
+ if (shift)
+ shift = false;
+ else
+ shift = false;
+ dsp->set_flag_status(0x0E, shift);
dsp->draw_flag(0x0E);
}