mirror of https://github.com/ArduPilot/ardupilot
Rover: rename guided limits start_time_ms
This commit is contained in:
parent
591e2ebeea
commit
28ac2c2600
|
@ -419,7 +419,7 @@ protected:
|
||||||
struct {
|
struct {
|
||||||
uint32_t timeout_ms;// timeout from the time that guided is invoked
|
uint32_t timeout_ms;// timeout from the time that guided is invoked
|
||||||
float horiz_max; // horizontal position limit in meters from where guided mode was initiated (0 = no limit)
|
float horiz_max; // horizontal position limit in meters from where guided mode was initiated (0 = no limit)
|
||||||
uint32_t start_time;// system time in milliseconds that control was handed to the external computer
|
uint32_t start_time_ms; // system time in milliseconds that control was handed to the external computer
|
||||||
Location start_loc; // starting location for checking horiz_max limit
|
Location start_loc; // starting location for checking horiz_max limit
|
||||||
} limit;
|
} limit;
|
||||||
};
|
};
|
||||||
|
|
|
@ -220,7 +220,7 @@ void ModeGuided::limit_clear()
|
||||||
// only called from AUTO mode's start_guided method
|
// only called from AUTO mode's start_guided method
|
||||||
void ModeGuided::limit_init_time_and_location()
|
void ModeGuided::limit_init_time_and_location()
|
||||||
{
|
{
|
||||||
limit.start_time = AP_HAL::millis();
|
limit.start_time_ms = AP_HAL::millis();
|
||||||
limit.start_loc = rover.current_loc;
|
limit.start_loc = rover.current_loc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ void ModeGuided::limit_init_time_and_location()
|
||||||
bool ModeGuided::limit_breached() const
|
bool ModeGuided::limit_breached() const
|
||||||
{
|
{
|
||||||
// check if we have passed the timeout
|
// check if we have passed the timeout
|
||||||
if ((limit.timeout_ms > 0) && (millis() - limit.start_time >= limit.timeout_ms)) {
|
if ((limit.timeout_ms > 0) && (millis() - limit.start_time_ms >= limit.timeout_ms)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue