Skip to content

Commit

Permalink
Backoff bugfix, portability
Browse files Browse the repository at this point in the history
  • Loading branch information
gioblu committed Sep 14, 2016
1 parent 5fc8eb1 commit eef9592
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion PJON.h
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,9 @@ limitations under the License. */

if(
(uint32_t)(micros() - packets[i].registration) >
packets[i].timing + (uint32_t)packets[i].attempts * (uint32_t)packets[i].attempts * (uint32_t)packets[i].attempts
(uint32_t)(
packets[i].timing +
((uint32_t)packets[i].attempts * (uint32_t)packets[i].attempts * (uint32_t)packets[i].attempts))
) packets[i].state = send_packet(packets[i].content, packets[i].length);
else continue;

Expand Down

0 comments on commit eef9592

Please sign in to comment.