Commit Graph

60 Commits

Author SHA1 Message Date
Matthias Grob 92adc71424 ArmStateMachine: port over unit tests to functional gtests 2022-04-06 10:02:14 +02:00
Matthias Grob 074080c816 Commander: separate out arm state machine to class
Pure refactoring and just the first step to avoid conflicts on the way.
2022-04-06 10:02:14 +02:00
Silvan Fuhrer a7ddaf08c4 vehicle_status_flags.msg: remove condition_ prefix to reduce message size
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-03-23 10:37:51 -04:00
Daniel Agar ad447ab223 commander: respect control mode for prearm requirements
- preflight tolerate ekf2 warnings if not in an attitude/velocity/position mode (eg manual or acro)
2022-01-31 09:48:37 -05:00
Beat Küng 5ac43e7236 commander: switch to events 2021-09-11 14:08:41 -04:00
Matthias Grob 531de5c588 Commander: switch all state_machine_helper functions to pass by reference 2021-03-30 22:33:01 -04:00
Beat Küng 5f8c6512b3 vehicle_status: add latest arming/disarming reason
Makes it easier to debug.
2020-08-04 10:53:20 -04:00
Daniel Agar 0e70578052 commander: move most static variables and parameters to class 2019-12-23 23:38:10 -05:00
Matthias Grob 1a79f75f94 Commander: start pulling arming related parts into separate folder
* PreFlightCheck: remove unused reportFailures flag
* Commander: pull all pre flight checks together on the PreFlightCheck class
* PreFlightCheck: separate checks into their own files
2019-11-05 11:25:59 -05:00
Daniel Agar c284198bec clang-tidy: partially fix hicpp-use-override 2019-10-28 10:50:31 -04:00
Beat Küng d64d3170c0 commander unit tests: enable preflight checks
- the last check expects pre_arm to run so we need to enable the
  preflight checks. This is closer to the real system.
- as a result we need to enable HIL for other tests so that the sensors
  are not checked.
2019-08-19 10:54:56 +02:00
Andrei Korigodski 5133453822 vehicle_status: replace ARMING_STATE_REBOOT with ARMING_STATE_SHUTDOWN
Signed-off-by: Andrei Korigodski <akorigod@gmail.com>
2019-08-05 05:55:33 -07:00
Timothy Scott 21760a5856 Changed constant name to UNMANNED_GROUND_VEHICLE 2019-06-13 10:04:26 +02:00
Timothy Scott a134da6e12 Removed is_rotor_wing, replaced with vehicle_type 2019-06-13 10:04:26 +02:00
Daniel Agar 48d9484ceb commander fix and enforce code style 2018-11-28 20:42:03 -05:00
Daniel Agar 6396e486bd commander cleanup battery failsafe handling 2018-08-21 02:38:51 -04:00
Daniel Agar 4e32cb17df clang-tidy modernize-use-equals-default 2018-05-18 22:48:55 +02:00
Daniel Agar ea3acb7121 cmake remove circular linking and reorganize
- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
2018-04-29 21:48:54 -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 db7e8635a2 commander state machine helper pass battery and safety as const references 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 f59b7c7399 commander is_safe() use const references 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 8b0ba3c34c commander log full status flags 2018-01-28 19:28:32 +01: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
Daniel Agar a02caff1bc unit_test inline implementation and remove module build 2017-08-23 08:06:55 +02:00
Daniel Agar 1913b970d7 main state auto mission don't require valid mission 2017-04-20 11:18:32 -04:00
Daniel Agar c1d9972244 commander add parameter COM_ARM_MIS_REQ
- arm without mission on by default
2017-04-20 11:18:32 -04:00
Daniel Agar f6eecf4d5c commander tests group TRANSITION_CHANGED tests 2017-02-18 08:03:19 +01:00
Daniel Agar c14c9c20eb commander tests allow FW ACRO 2017-02-18 08:03:19 +01:00
Daniel Agar feda5caac2 commander state machine helper fix style and remove unused 2017-02-12 10:29:59 +01:00
Daniel Agar 6631e72d6f clang-tidy modernize-redundant-void-arg 2017-02-01 22:15:50 -05:00
Anton Matosov 3a17c07b1e Implement RC and DL failsafe action handling for multirotors
Move RC and DL failsafe actions handling from navigator to commander (credits to @AndreasAntener)
Separate manual kill switch handling via manual_lockdown to prevent override and release of software lockdown by RC switch

Other changes:
Add failsafe tune
Fix LED blinking for Pixracer
Return back support for rc inputs in simulator but now it is configurable via cmake
2016-12-27 00:38:13 +01:00
Andreas Antener b531e65f6a Airspeed check: updated message and explained test parameters 2016-12-02 22:56:48 +01:00
Andreas Antener f772fc2d02 Airspeed: preflight check for bad offset, fixed calls to preflight checks (vtol & airspeed) 2016-12-02 22:56:48 +01:00
Daniel Agar 390a7165dd make tests (#5163)
* make tests use px4 instead of mainapp

* commander_tests ALTCTL - not rotary requires altitude
2016-07-29 11:46:47 -04:00
Daniel Agar 6aa935fed6 FW don't allow ACRO or RATTITUDE 2016-07-29 13:48:21 +02:00
Beat Küng 8a12dee125 cmake: remove all module.mk files & cmake conversion script (#4918)
It seems these files are leftovers.
2016-06-28 09:26:36 +02:00
Julian Oes c7ec07be70 commander: properly use new param
The param COM_ARM_WO_GPS is set to 1 by default to allow arming without
GPS. This then sets a bool arm_without_gps which translates to
!GNSS_check in preflightCheck.
2016-06-21 10:21:34 +02:00
Beat Küng d082060429 commander: fix wrong #ifdef header guard in state_machine_helper_test.h 2016-05-14 11:27:07 +02:00
Daniel Agar 008354f935 testing cleanup 2016-05-13 13:01:41 +02:00
Daniel Agar 2bc74fd5d9 restore px4fmu-v2_test 2016-05-13 13:01:41 +02:00
Julian Oes bba0d0384d drivers/modules: changes after mavlink_log change
The mavlink_log API changes lead to changes in all drivers/modules using
it.
2016-03-24 13:10:02 +01:00
nopeppermint 78f9bb79f1 more spelling mistakes 2016-01-11 08:38:09 +01:00
James Goppert 1d6b31d196 Switch to cmake build system. 2015-09-07 20:37:45 -04:00
Lorenz Meier 17e487cad4 Update commander test suite 2015-04-20 09:14:14 +02:00
Lorenz Meier 4f0896b105 commander tests: Update test routine to match expected / designed error handling behaviour 2015-04-20 09:14:13 +02:00
Thomas Gubler 8e7974e2e2 fix uorb constants for test functions 2015-01-28 16:32:47 +01:00
Lorenz Meier 1507d479e0 commander: Refresh safety tests to avoid false positives in unit tests. 2015-01-10 19:50:44 +01:00