Skip to content

Commit 6f96375

Browse files
author
Daniel K. O. (dkosmari)
committed
Fixed battery critical threshold.
1 parent e2605cb commit 6f96375

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

wiiuse/dynamics.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ static unsigned calc_balanceboard_battery_bars(const struct wii_board_t *wb)
256256
return 3;
257257
if (wb->raw_bat >= 0x78)
258258
return 2;
259-
if (wb->raw_bat >= wb->cal_bat)
259+
if (wb->raw_bat > wb->cal_bat)
260260
return 1;
261261
return 0;
262262
}

wiiuse/wiiboard.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ int wii_board_handshake(struct wiimote_t* wm, struct wii_board_t* wb, ubyte* dat
8484
wb->cal_sensor[i].ref_34 = load_be_u16(data + offset + 0x14 + 2*i);
8585
}
8686

87-
/* The minimum battery value (always 0x6a). */
87+
/* The critical battery value (always 0x69). */
8888
wb->cal_bat = data[offset + 0x01];
8989

9090
/* The reference temperature. */

0 commit comments

Comments
 (0)