Skip to content

Commit

Permalink
Fix calculation of version_status_cycle.
Browse files Browse the repository at this point in the history
  • Loading branch information
breaker27 committed Sep 22, 2022
1 parent b8d6875 commit d493658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firmware/shc_powerswitch/shc_powerswitch.c
Expand Up @@ -598,7 +598,7 @@ int main(void)
station_packetcounter = e2p_powerswitch_get_basestationpacketcounter();

port_status_cycle = (uint16_t)e2p_powerswitch_get_statuscycle() * 60;
version_status_cycle = (uint16_t)90000L / port_status_cycle; // once every 25 hours
version_status_cycle = (uint16_t)(90000UL / port_status_cycle); // once every 25 hours
version_status_cycle_counter = version_status_cycle - 1; // send right after startup

// read device id
Expand Down

0 comments on commit d493658

Please sign in to comment.