Skip to content

Commit

Permalink
Fixed MAX_TIME_STAMP back to seconds
Browse files Browse the repository at this point in the history
Added comment to MAX_TIME_STAMP to clarify units..
  • Loading branch information
gabrielcox committed Jul 18, 2024
1 parent 910a6a3 commit dfaf3b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libopendroneid/opendroneid.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static uint16_t encodeTimeStamp(float Seconds_data)
if (Seconds_data == INV_TIMESTAMP)
return INV_TIMESTAMP;
else
return (uint16_t) intRangeMax((int64_t) roundf(Seconds_data*10), 0, MAX_TIMESTAMP);
return (uint16_t) intRangeMax((int64_t) roundf(Seconds_data*10), 0, MAX_TIMESTAMP * 10);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion libopendroneid/opendroneid.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extern "C" {
#define MIN_ALT (-1000) // Minimum altitude
#define MAX_ALT 31767.5f// Maximum altitude
#define INV_ALT MIN_ALT // Invalid altitude
#define MAX_TIMESTAMP (60 * 60 * 10) // 36000 1/10ths of second (1 hour)
#define MAX_TIMESTAMP (60 * 60) // 1 hour in seconds
#define INV_TIMESTAMP 0xFFFF // Invalid, No Value or Unknown Timestamp
#define MAX_AREA_RADIUS 2550

Expand Down

0 comments on commit dfaf3b9

Please sign in to comment.