mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
iridiumsbd fix sign-compare
This commit is contained in:
parent
275d81d4d5
commit
6b2fa1127f
@ -276,7 +276,7 @@ void IridiumSBD::standby_loop(void)
|
||||
// check for incoming SBDRING, handled inside read_at_command()
|
||||
read_at_command();
|
||||
|
||||
if (param_read_interval_s != 0 && (hrt_absolute_time() - last_read_time) / 1000000 > param_read_interval_s) {
|
||||
if (param_read_interval_s != 0 && ((int64_t)(hrt_absolute_time() - last_read_time) > param_read_interval_s * 1000000)) {
|
||||
rx_session_pending = true;
|
||||
}
|
||||
|
||||
@ -456,7 +456,7 @@ ssize_t IridiumSBD::write(struct file *filp, const char *buffer, size_t buflen)
|
||||
{
|
||||
if (verbose) { PX4_INFO("WRITE: LEN %d, TX WRITTEN: %d", buflen, tx_buf_write_idx); }
|
||||
|
||||
if (buflen > SATCOM_TX_BUF_LEN - tx_buf_write_idx) {
|
||||
if ((ssize_t)buflen > SATCOM_TX_BUF_LEN - tx_buf_write_idx) {
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ public:
|
||||
bool task_should_exit = false;
|
||||
int uart_fd = -1;
|
||||
|
||||
int param_read_interval_s;
|
||||
int32_t param_read_interval_s;
|
||||
|
||||
hrt_abstime last_signal_check = 0;
|
||||
uint8_t signal_quality = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user