mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Set checkBatteryLevel false only when it was actually true
This commit is contained in:
parent
e4c581c991
commit
b3303d14fc
1 changed files with 3 additions and 2 deletions
5
Wii.cpp
5
Wii.cpp
|
@ -332,16 +332,17 @@ void WII::ACLData(uint8_t* l2capinbuf) {
|
||||||
setReportMode(false, 0x31); // If there is no extension connected we will read the buttons and accelerometer
|
setReportMode(false, 0x31); // If there is no extension connected we will read the buttons and accelerometer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
#ifdef EXTRADEBUG
|
#ifdef EXTRADEBUG
|
||||||
else
|
|
||||||
Notify(PSTR("\r\nChecking battery level"), 0x80);
|
Notify(PSTR("\r\nChecking battery level"), 0x80);
|
||||||
#endif
|
#endif
|
||||||
|
checkBatteryLevel = false; // Check for extensions by default
|
||||||
|
}
|
||||||
#ifdef DEBUG_USB_HOST
|
#ifdef DEBUG_USB_HOST
|
||||||
if(l2capinbuf[12] & 0x01)
|
if(l2capinbuf[12] & 0x01)
|
||||||
Notify(PSTR("\r\nWARNING: Battery is nearly empty"), 0x80);
|
Notify(PSTR("\r\nWARNING: Battery is nearly empty"), 0x80);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
checkBatteryLevel = false; // Check for extensions by default
|
|
||||||
break;
|
break;
|
||||||
case 0x21: // Read Memory Data
|
case 0x21: // Read Memory Data
|
||||||
if((l2capinbuf[12] & 0x0F) == 0) { // No error
|
if((l2capinbuf[12] & 0x0F) == 0) { // No error
|
||||||
|
|
Loading…
Reference in a new issue