Commit Graph

310 Commits

Author SHA1 Message Date
Daniel Agar
f81a1aedcd commander state machine add global position check 2018-04-16 20:43:33 -04:00
Daniel Agar
729c98d9e2 commander move avionics rail voltage check out of state machine
- add preflight_check helper
2018-04-16 20:43:33 -04:00
Daniel Agar
415c5f13bb commander move power check to prearm_check 2018-04-16 20:43:33 -04:00
Daniel Agar
c679703da4 commander move arm authorization to prearm_check 2018-04-16 20:43:33 -04:00
Daniel Agar
082126610d commander status flags delete condition_system_prearm_error_reported
- this flag often results in hiding useful information, or adding
   useless information to the mavlink console
2018-04-16 20:43:33 -04:00
Daniel Agar
bb13b602e2 commander arming_state_transition cleanup preflight and prearm calls
- only call prearm if preflight passes
 - prearm always provide feedback
2018-04-16 20:43:33 -04:00
Daniel Agar
208e320975 commander prearm_check is always prearm 2018-04-16 20:43:33 -04:00
Daniel Agar
e5d9c826d8 commander state machine fix preflight and prearm error
-  fixes #9155
2018-04-16 20:43:33 -04:00
Daniel Agar
35bf37d617 commander state machine helper shorten names 2018-04-16 20:43:33 -04:00
Daniel Agar
0f6a94894d commander state machine helper fix code style 2018-03-29 10:25:56 -04:00
Daniel Agar
db7e8635a2 commander state machine helper pass battery and safety as const references 2018-03-29 10:25:56 -04:00
Daniel Agar
4ccfc280c8 commander arming_state_transition add HIL boolean 2018-03-29 10:25:56 -04:00
Daniel Agar
e395b3578f delete unused ARMING_STATE_ARMED_ERROR state 2018-03-29 10:25:56 -04:00
Daniel Agar
e29b568d33 state machine helper remove unused headers 2018-03-29 10:25:56 -04:00
Daniel Agar
bff2136db0 commander state machine helper use constexpr for strings 2018-03-29 10:25:56 -04:00
Daniel Agar
f59b7c7399 commander is_safe() use const references 2018-03-29 10:25:56 -04:00
Daniel Agar
376b5e4747 state machine helper make vehicle_status_flags const 2018-03-29 10:25:56 -04:00
Daniel Agar
8c8fe17ff3 commander delete unused main_state_prev 2018-03-29 10:25:56 -04:00
Daniel Agar
c194c1acb5 commander use const where possible
- this helps tease apart the various pieces of commander.
2018-03-29 10:25:56 -04:00
Daniel Agar
458db2e508 vehicle_global_position remove redundant evh and evv
- vehicle_status_flags condition_global_velocity_valid is also unnecessary
2018-03-05 13:20:28 -05:00
Daniel Agar
4e45d7959c commander remove gps receiver checks 2018-02-19 15:28:47 +01:00
Daniel Agar
8b0ba3c34c commander log full status flags 2018-01-28 19:28:32 +01:00
SungTae Moon
f8f95078e8 commander status reuse arming_state_names in state_machine_helper (#8667) 2018-01-27 10:22:29 -05:00
Nicolas de Palezieux
f2dbb0ad3b commander : add support for precision landing measurements 2018-01-15 10:27:23 +01:00
Daniel Agar
b1a3475ebf commander mission valid check require updated mission_result 2018-01-14 12:53:53 +01:00
Lorenz Meier
90b4afebb5 Commander: properly separate preflight check and prearm checks
We were running pre-arm checks before when not arming, which led to annoying error messages on vehicles that were on the bench or serviced on the ground. Now we really only run them when trying to arm.
2017-12-31 16:37:02 +01:00
Lorenz Meier
6a701adf3c HITL: Remove hard requirement for airframes 2017-12-30 11:24:22 +01:00
Lorenz Meier
bb516be61e Commander: Enforce correct system configuration for HITL
This is important to ensure that users are not trying to use HITL with airframes that will not work.
2017-12-30 11:24:22 +01:00
Lorenz Meier
644db1b03f State machine helper: Fix typo 2017-12-30 11:24:22 +01:00
Daniel Agar
fc7c8b4b89 vehicle_status delete engine_failure_cmd 2017-12-27 02:41:10 +08:00
Daniel Agar
17e17d79dd commander delete unused vtol_transition_failure_cmd 2017-12-27 02:41:10 +08:00
Daniel Agar
d0fba8bf8b commander delete unused data_link_lost_cmd 2017-12-27 02:41:10 +08:00
Daniel Agar
c0be801b5c commander delete unused rc_signal_lost_cmd 2017-12-27 02:41:10 +08:00
Daniel Agar
5a6cde41d5 commander delete unused gps_failure_cmd 2017-12-27 02:41:10 +08:00
Daniel Agar
294fbc46a9 commander initial class structure 2017-12-27 02:41:10 +08:00
Lorenz Meier
4abc578932 Commander: State machine helper documentation
Future contributors need to know about the time constraints that the execution of this function needs to satisfy.
2017-12-02 11:39:52 +00:00
Daniel Agar
9a9923c517 commander simplify sensors PreflightCheck 2017-10-06 16:22:53 -07:00
Daniel Agar
7a42424411 Navigator resurrect FW GPS failure navigation (#7762) 2017-09-08 12:18:59 -04:00
Sugnan Prabhu S
6562dd496b mavlink: implement MAV_CMD_REQUEST_FLIGHT_INFORMATION
Signed-off-by: Sugnan Prabhu S <sugnan.prabhu.s@intel.com>
2017-08-31 09:26:39 +02:00
José Roberto de Souza
3fd7e3f89c modules: commander: Implement arm authorization request
If the second bit of COM_ARM_MIS_EXT_REQ is set the vehicle
will only arm after receive an authorization.

The authorization flow:
vehicle/external -> command: arm authorization request -> arm authorizer
vehicle <- command ack with result in progress <- arm authorizer
vehicle <- any data request <- arm authorizer
vehicle -> data response -> arm authorizer
vehicle <- command ack authorizing or denying <- arm authorizer

Right now there is 2 ways to start the arm authorization request,
that can be configured by COM_ARM_AUTH parameter.
- One arm: When pilot request the vehicle to arm, it will request
authorization blocking the arm process up to the timeout defined in
COM_ARM_AUTH parameter.
- Two arms request: The first arm request will request the
authorization and will deny the first arm request, if authorizer
approved the request, pilot can arm again within the authorized
time and arm without any block.

The arm authorizer can be running anywhere(compute board or PX4
itself) and it is responsible to request the mission list or any
other information to vehicle before send a final response, it
should send to vehicle a COMMAND_ACK with
result = MAV_RESULT_IN_PROGRESS as soon as it receive the arm
authorization request and the final result
as after it got all the data that it needs authorize or deny the
request.
2017-08-28 08:28:57 +02:00
José Roberto de Souza
7e3ab95975 modules: commander: Group arm requirements in just one byte and add a new requirement
Instead of having several bools to each requirement to arm, lets group then
in a byte and use bitmask.
This also add a new arm requirement "arm authorization" that
will be implemented in another patch.
2017-08-28 08:28:57 +02:00
AndresRengifo
641f2f856b fix: battery prearm check ignored when CBRK_SUPPLY_CHK is disabled 2017-08-20 19:36:54 +02:00
Lorenz Meier
c94e54bbab Commander: Handle HITL state in all places consistently 2017-08-02 15:12:25 +02:00
Daniel Agar
d5a890041b commander RTL failsafe should be sticky 2017-07-30 01:51:27 +02:00
Lorenz Meier
61b0a81bf9 HITL startup: Further simplification of boot logic in commander 2017-07-29 23:06:50 +02:00
Lorenz Meier
5838556742 HITL handling: Enforce the use of the activation parameter for HITL configuration 2017-07-29 23:06:50 +02:00
Daniel Agar
625dc67f84 commander offboard loss rc act unreachable
- coverity fix 145492
2017-06-04 02:37:09 +08:00
Daniel Agar
64ed96d81a clang-tidy readability-simplify-boolean-expr 2017-06-02 19:35:18 -04:00
Simone Guscetti
6201fb5641 commander: arming with critical battery is not allowed 2017-05-29 18:40:57 +08:00
lovettchris
47faaa5d78 Add loiter option to COM_OBL_RC_ACT (#7170) 2017-05-08 14:17:29 -04:00