mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 08:38:36 -04:00
Log: better way to check for -1 long portably
This commit is contained in:
parent
6d0a32cc65
commit
a045e4ec7e
@ -347,7 +347,7 @@ static int find_last_log_page(int bottom_page)
|
||||
|
||||
//Serial.printf("look page:%d, check:%d\n", look_page, check);
|
||||
|
||||
if(check == (int32_t)~0)
|
||||
if(check == -1L)
|
||||
top_page = look_page;
|
||||
else
|
||||
bottom_page = look_page;
|
||||
|
@ -319,7 +319,7 @@ static int find_last_log_page(int bottom_page)
|
||||
look_page = (top_page + bottom_page) / 2;
|
||||
DataFlash.StartRead(look_page);
|
||||
check = DataFlash.ReadLong();
|
||||
if(check == (int32_t)~0)
|
||||
if(check == -1L)
|
||||
top_page = look_page;
|
||||
else
|
||||
bottom_page = look_page;
|
||||
|
Loading…
Reference in New Issue
Block a user