Skip to content

Commit

Permalink
Fixed default battery handler oveflow
Browse files Browse the repository at this point in the history
  • Loading branch information
p0lyg0n1 committed Sep 19, 2024
1 parent 0435d97 commit d04a72d
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hardware/arduino/zunoG2/bootloaders/build_md.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"hw_revisions": {"0707": {"seq": 4683, "updated": 1723910963.8166242, "chip": "ZGM130S037HGN1", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0700": {"seq": 4683, "updated": 1723910967.491956, "chip": "ZGM130S037HGN1", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0701": {"seq": 4683, "updated": 1723910969.234942, "chip": "ZGM130S037HGN1", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0703": {"seq": 4683, "updated": 1723910970.935432, "chip": "ZGM130S037HGN1", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0704": {"seq": 4683, "updated": 1723910973.051305, "chip": "ZGM130S037HGN1", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0805": {"seq": 4684, "updated": 1723911015.749399, "chip": "ZGM230SA27HGN", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0803": {"seq": 4684, "updated": 1723911017.035371, "chip": "ZGM230SA27HGN", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0802": {"seq": 4685, "updated": 1723911068.57482, "chip": "ZGM230SB27HGN", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0804": {"seq": 4686, "updated": 1723911109.756424, "chip": "EFR32ZG23B020F512IM48", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0800": {"seq": 4686, "updated": 1723911111.277199, "chip": "EFR32ZG23B020F512IM48", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0813": {"seq": 4687, "updated": 1723911156.969007, "chip": "EFR32ZG23A010F512GM40", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0810": {"seq": 4687, "updated": 1723911158.197418, "chip": "EFR32ZG23A010F512GM40", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0811": {"seq": 4687, "updated": 1723911159.470032, "chip": "EFR32ZG23A010F512GM40", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0812": {"seq": 4687, "updated": 1723911155.7037902, "chip": "EFR32ZG23A010F512GM40", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0801": {"seq": 4688, "updated": 1723911218.421601, "chip": "EFR32ZG23B010F512IM48", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}}}
{"hw_revisions": {"0707": {"seq": 4705, "updated": 1725641476.737828, "chip": "ZGM130S037HGN1", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0700": {"seq": 4705, "updated": 1725641477.497597, "chip": "ZGM130S037HGN1", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0701": {"seq": 4705, "updated": 1725641478.242699, "chip": "ZGM130S037HGN1", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0703": {"seq": 4705, "updated": 1725641479.008141, "chip": "ZGM130S037HGN1", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}, "0704": {"seq": 4705, "updated": 1725641479.757041, "chip": "ZGM130S037HGN1", "core_version_major": 3, "core_version_minor": 13, "core_version_patch": 1}}}
Binary file modified hardware/arduino/zunoG2/bootloaders/zuno_bootloader_HW0704.bin
Binary file not shown.
Binary file modified hardware/arduino/zunoG2/bootloaders/zuno_bootloader_HW0800.bin
Binary file not shown.
Binary file modified hardware/arduino/zunoG2/bootloaders/zuno_bootloader_HW0803.bin
Binary file not shown.
Binary file modified hardware/arduino/zunoG2/bootloaders/zuno_bootloader_HW0804.bin
Binary file not shown.
Binary file modified hardware/arduino/zunoG2/bootloaders/zuno_bootloader_HW0805.bin
Binary file not shown.
Binary file modified hardware/arduino/zunoG2/bootloaders/zuno_bootloader_HW0810.bin
Binary file not shown.
Binary file modified hardware/arduino/zunoG2/bootloaders/zuno_bootloader_HW0811.bin
Binary file not shown.
2 changes: 2 additions & 0 deletions hardware/arduino/zunoG2/cores/LLCore/zuno_analog_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ uint8_t defaultBatteryHandler(void) {
res >>= 12;
if(res >= BATTERY_HIGH)
return 100;
if(res <= BATTERY_LOW)
return 0;
res -= BATTERY_LOW;
res *= 100;
return res / (BATTERY_HIGH - BATTERY_LOW);
Expand Down

0 comments on commit d04a72d

Please sign in to comment.