Disable auto poweroff while USB is connected. Fixed keyoard shift planes persisting poweroff.

This commit is contained in:
claudiol 2017-11-21 12:36:58 -05:00
parent 01188420bb
commit 5cee4b4014
3 changed files with 3 additions and 1 deletions

View file

@ -228,6 +228,7 @@ halUpdateFonts();
// FLUSH THE ON-KEY KEYPRESS FROM THE KEYBOARD BUFFER BEFORE ENTERING THE OUTER LOOP
// THIS CAN CANCEL AN EXISTING COMMAND LINE
keyb_flushnowait();
keyb_setshiftplane(0,0,0,0);
if (rplCheckAlarms())
halSetNotification(N_CONNECTION, 0xf);

View file

@ -6613,7 +6613,7 @@ void halOuterLoop(BINT timeoutms, int (*dokey)(BINT), BINT flags)
// AUTO-OFF WHEN IDLING
if(!(flags&OL_NOAUTOOFF) && (halFlags&HAL_AUTOOFFTIME)) {
if(!(flags&OL_NOAUTOOFF) && (halFlags&HAL_AUTOOFFTIME) && (!usb_isconnected())) {
BINT64 autoofftime=15000000 << (GET_AUTOOFFTIME(halFlags));
if(halTicks()-offcounter >=autoofftime) {
halPreparePowerOff();

View file

@ -322,6 +322,7 @@ void startup(int prevstate)
tmr_setup();
__keyb_init();
usb_init(1);
// ADD MORE HARDWARE INITIALIZATION HERE