mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-01 03:43:46 +08:00
remove read_param_timeout (#2095)
* remove read_param_timeout * missed that old-commit-hash: 9cd5180b43e03f84adb870fa25c91428a18394e0
This commit is contained in:
@@ -308,9 +308,11 @@ int main(int argc, char* argv[]) {
|
||||
ui_draw_vision_alert(s, s->scene.alert_size, s->status, s->scene.alert_text1.c_str(), s->scene.alert_text2.c_str());
|
||||
}
|
||||
|
||||
read_param_timeout(&s->is_metric, "IsMetric", &s->is_metric_timeout);
|
||||
int param_read = read_param_timeout(&s->last_athena_ping, "LastAthenaPingTime", &s->last_athena_ping_timeout);
|
||||
if (param_read != -1) { // Param was updated this loop
|
||||
|
||||
if (s->sm->frame % (2*UI_FREQ) == 0) {
|
||||
read_param(&s->is_metric, "IsMetric");
|
||||
} else if (s->sm->frame % (3*UI_FREQ) == 0) {
|
||||
int param_read = read_param(&s->last_athena_ping, "LastAthenaPingTime");
|
||||
if (param_read != 0) { // Failed to read param
|
||||
s->scene.athenaStatus = NET_DISCONNECTED;
|
||||
} else if (nanos_since_boot() - s->last_athena_ping < 70e9) {
|
||||
|
||||
Reference in New Issue
Block a user