Skip to content

Commit

Permalink
#968: further workaround to defeat optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
terrillmoore committed Nov 22, 2024
1 parent e11bd50 commit 8017555
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lmic/lmic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2608,7 +2608,8 @@ static void engineUpdate_inner (void) {
// otherwise the compiler falsely assumes that the computation
// is positive.
//
if( ((ostime_t) (txbeg - (now + TX_RAMPUP))) < 0 ) {
volatile ostime_t tdiff = txbeg - (now + TX_RAMPUP);
if( tdiff < 0 ) {
// We could send right now!
txbeg = now;
dr_t txdr = (dr_t)LMIC.datarate;
Expand Down

0 comments on commit 8017555

Please sign in to comment.