|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Classes | |
| struct | Control |
| struct | World |
| struct | Beat |
| struct | Check |
Functions | |
| self_test_battery_t | read_battery (void *, uint32_t now_ms, uint32_t) |
| bool | on_usb (void *) |
| self_test_reply_t | send_heartbeat (void *, const idle_heartbeat_t *hb, uint32_t) |
| idle_command_t | poll_command (void *) |
| void | set_state (flight_state_t to) |
| void | radio_task () |
| void | ground_arm (World &w, uint32_t t, uint16_t seq) |
| emmc_status_t | no_card (void *, uint32_t *n) |
| emmc_status_t | no_io (void *, uint32_t, void *, uint32_t, uint32_t) |
| emmc_status_t | no_write (void *, uint32_t, const void *, uint32_t, uint32_t) |
| void | world_init (World &w) |
| void | run (World &w, uint32_t until) |
| void | note (const char *fmt,...) |
| unsigned | beats (const World &w, Beat *out, unsigned cap) |
| void | check_idle_heartbeat () |
| void | check_idle_rx_while_asleep () |
| void | check_idle_arm_wake () |
| void | check_idle_usb () |
| void | check_idle_tx_fail () |
| void | check_idle_clock () |
Variables | |
| constexpr uint32_t | kTrueLsiHz = 30500 |
| constexpr uint32_t | kBootMs = 5000 |
| constexpr uint32_t | kCounts7V92 = 48853 |
| constexpr uint8_t | kTargetId = 0x01 |
| World * | W = nullptr |
| int | failed |
| char | detail [256] |
| const Check | checks [] |
Definition at line 305 of file idle_e2e.cpp.
References anonymous_namespace{idle_e2e.cpp}::World::air, radio_link::FakeAir::Sent::data, radio_link::decode_frame(), radio_link::get_u16(), radio_link::get_u32(), radio_link::Heartbeat, radio_link::kHeartbeatLen, radio_link::FakeAir::Sent::len, radio_link::FakeAir::n_sent, radio_link::Ok, radio_link::Frame::payload, radio_link::Frame::payload_len, radio_link::FakeAir::sent, radio_link::FakeAir::Sent::t_ms, and radio_link::Frame::type.
Referenced by check_idle_arm_wake(), check_idle_heartbeat(), and check_idle_usb().
| void anonymous_namespace{idle_e2e.cpp}::check_idle_arm_wake | ( | ) |
Definition at line 367 of file idle_e2e.cpp.
References anonymous_namespace{idle_e2e.cpp}::World::air, anonymous_namespace{idle_e2e.cpp}::World::armed_at, b, beats(), anonymous_namespace{idle_e2e.cpp}::World::early_wakes, EXPECT, FLIGHT_ARMED, ground_arm(), kBootMs, radio_link::FakeAir::listening, anonymous_namespace{idle_e2e.cpp}::World::log, mode_outputs(), note(), o, emmc_log_t::recording, radio_link::FakeAir::sniffing, anonymous_namespace{idle_e2e.cpp}::World::state, and world_init().
| void anonymous_namespace{idle_e2e.cpp}::check_idle_clock | ( | ) |
Definition at line 435 of file idle_e2e.cpp.
References anonymous_namespace{idle_e2e.cpp}::World::board, EXPECT, kBootMs, kTrueLsiHz, note(), anonymous_namespace{idle_e2e.cpp}::World::now, and world_init().
| void anonymous_namespace{idle_e2e.cpp}::check_idle_heartbeat | ( | ) |
Definition at line 322 of file idle_e2e.cpp.
References anonymous_namespace{idle_e2e.cpp}::World::air, b, beats(), EXPECT, FLIGHT_IDLE, kBootMs, radio_link::FakeAir::n_sent, note(), state, radio_link::FakeAir::tx_attempts, and world_init().
| void anonymous_namespace{idle_e2e.cpp}::check_idle_rx_while_asleep | ( | ) |
Definition at line 354 of file idle_e2e.cpp.
References EXPECT, kBootMs, note(), anonymous_namespace{idle_e2e.cpp}::World::sleeps, anonymous_namespace{idle_e2e.cpp}::World::sleeps_deaf, and world_init().
| void anonymous_namespace{idle_e2e.cpp}::check_idle_tx_fail | ( | ) |
Definition at line 411 of file idle_e2e.cpp.
References anonymous_namespace{idle_e2e.cpp}::World::air, idle_heartbeat_t::consecutive_send_failures, EXPECT, failures, anonymous_namespace{idle_e2e.cpp}::World::idle, idle_last_heartbeat(), kBootMs, note(), anonymous_namespace{idle_e2e.cpp}::World::setup, anonymous_namespace{idle_e2e.cpp}::World::sleeps_deaf, radio_link::FakeAir::tx_attempts, radio_link::FakeAir::tx_never_done, radio_link::Sx1262Setup::tx_timeouts(), and world_init().
| void anonymous_namespace{idle_e2e.cpp}::check_idle_usb | ( | ) |
Definition at line 394 of file idle_e2e.cpp.
References b, idle_heartbeat_t::battery, anonymous_namespace{idle_e2e.cpp}::World::battery_counts, beats(), EXPECT, anonymous_namespace{idle_e2e.cpp}::World::idle, IDLE_BATT_USB, idle_last_heartbeat(), kBootMs, note(), anonymous_namespace{idle_e2e.cpp}::World::on_usb, and world_init().
| void anonymous_namespace{idle_e2e.cpp}::ground_arm | ( | World & | w, |
| uint32_t | t, | ||
| uint16_t | seq ) |
Definition at line 193 of file idle_e2e.cpp.
References radio_link::Arm, radio_link::encode_frame(), g, anonymous_namespace{idle_e2e.cpp}::World::ground, radio_link::kArmKey, kTargetId, anonymous_namespace{idle_e2e.cpp}::World::n_ground, p, and radio_link::put_u32().
Referenced by check_idle_arm_wake().
| emmc_status_t anonymous_namespace{idle_e2e.cpp}::no_card | ( | void * | , |
| uint32_t * | n ) |
| emmc_status_t anonymous_namespace{idle_e2e.cpp}::no_io | ( | void * | , |
| uint32_t | , | ||
| void * | , | ||
| uint32_t | , | ||
| uint32_t | ) |
| emmc_status_t anonymous_namespace{idle_e2e.cpp}::no_write | ( | void * | , |
| uint32_t | , | ||
| const void * | , | ||
| uint32_t | , | ||
| uint32_t | ) |
| void anonymous_namespace{idle_e2e.cpp}::note | ( | const char * | fmt, |
| ... ) |
Definition at line 291 of file idle_e2e.cpp.
References failed.
Referenced by check_idle_arm_wake(), check_idle_clock(), check_idle_heartbeat(), check_idle_rx_while_asleep(), check_idle_tx_fail(), and check_idle_usb().
| bool anonymous_namespace{idle_e2e.cpp}::on_usb | ( | void * | ) |
| idle_command_t anonymous_namespace{idle_e2e.cpp}::poll_command | ( | void * | ) |
Definition at line 143 of file idle_e2e.cpp.
References IDLE_CMD_ARM, IDLE_CMD_DISARM, IDLE_CMD_NONE, MODE_CMD_ARM, and W.
Referenced by world_init().
| void anonymous_namespace{idle_e2e.cpp}::radio_task | ( | ) |
Definition at line 154 of file idle_e2e.cpp.
References a, radio_link::Arm, radio_link::Disarm, MODE_CMD_ARM, MODE_CMD_DISARM, mode_route_command(), MODE_TO_IDLE_LOOP, MODE_TRANSITION, radio_link::None, set_state(), and W.
Referenced by run().
| self_test_battery_t anonymous_namespace{idle_e2e.cpp}::read_battery | ( | void * | , |
| uint32_t | now_ms, | ||
| uint32_t | ) |
Definition at line 107 of file idle_e2e.cpp.
References b, SELF_TEST_PASS, and W.
Referenced by world_init().
| void anonymous_namespace{idle_e2e.cpp}::run | ( | World & | w, |
| uint32_t | until ) |
Definition at line 230 of file idle_e2e.cpp.
References anonymous_namespace{idle_e2e.cpp}::World::air, anonymous_namespace{idle_e2e.cpp}::World::armed_at, anonymous_namespace{idle_e2e.cpp}::World::board, radio_link::Sx1262Setup::configure(), anonymous_namespace{idle_e2e.cpp}::World::control, anonymous_namespace{idle_e2e.cpp}::World::Ground::data, anonymous_namespace{idle_e2e.cpp}::World::early_wakes, FLIGHT_EV_ARM, FLIGHT_IDLE, flight_state_next(), anonymous_namespace{idle_e2e.cpp}::World::ground, anonymous_namespace{idle_e2e.cpp}::World::idle, idle_enter(), IDLE_EVENT_ARM_REQUESTED, IDLE_EVENT_SLEEP, idle_on_wake(), kTrueLsiHz, anonymous_namespace{idle_e2e.cpp}::World::Ground::len, radio_link::FakeAir::listening, anonymous_namespace{idle_e2e.cpp}::World::n_ground, anonymous_namespace{idle_e2e.cpp}::World::next_ground, anonymous_namespace{idle_e2e.cpp}::World::now, radio_link::Ok, radio_link::FakeAir::packet_arrives(), anonymous_namespace{idle_e2e.cpp}::World::queued, r, radio_task(), anonymous_namespace{idle_e2e.cpp}::Control::rx_switch, set_state(), anonymous_namespace{idle_e2e.cpp}::World::setup, sleep_elapsed_ms(), sleep_wut_reload(), anonymous_namespace{idle_e2e.cpp}::World::sleeps, anonymous_namespace{idle_e2e.cpp}::World::sleeps_deaf, radio_link::FakeAir::sniffing, anonymous_namespace{idle_e2e.cpp}::World::state, anonymous_namespace{idle_e2e.cpp}::World::Ground::t, and until().
| self_test_reply_t anonymous_namespace{idle_e2e.cpp}::send_heartbeat | ( | void * | , |
| const idle_heartbeat_t * | hb, | ||
| uint32_t | ) |
Definition at line 118 of file idle_e2e.cpp.
References idle_heartbeat_t::battery, radio_link::encode_frame(), radio_link::ErrTimeout, FLIGHT_IDLE, frame(), radio_link::Heartbeat, IDLE_BATT_FAIL, IDLE_BATT_OK, IDLE_BATT_WARN, radio_link::Ok, p, radio_link::radio_send(), SELF_TEST_FAIL, SELF_TEST_PASS, SELF_TEST_TIMEOUT, idle_heartbeat_t::supply_mv, idle_heartbeat_t::uptime_ms, and W.
Referenced by world_init().
| void anonymous_namespace{idle_e2e.cpp}::set_state | ( | flight_state_t | to | ) |
Definition at line 181 of file idle_e2e.cpp.
References emmc_log_on_state(), mode_outputs(), MODE_SNIFF_RX_MS, MODE_SNIFF_SLEEP_MS, and W.
Referenced by radio_task(), and run().
| void anonymous_namespace{idle_e2e.cpp}::world_init | ( | World & | w | ) |
Definition at line 217 of file idle_e2e.cpp.
References anonymous_namespace{idle_e2e.cpp}::World::chunks, anonymous_namespace{idle_e2e.cpp}::World::control, emmc_log_default_config(), emmc_log_init(), anonymous_namespace{idle_e2e.cpp}::World::idle, idle_init(), anonymous_namespace{idle_e2e.cpp}::World::log, no_card(), no_io(), no_write(), anonymous_namespace{idle_e2e.cpp}::Control::now, anonymous_namespace{idle_e2e.cpp}::World::now, on_usb(), poll_command(), port, read_battery(), anonymous_namespace{idle_e2e.cpp}::World::scratch, send_heartbeat(), and W.
Referenced by check_idle_arm_wake(), check_idle_clock(), check_idle_heartbeat(), check_idle_rx_while_asleep(), check_idle_tx_fail(), and check_idle_usb().
| const Check anonymous_namespace{idle_e2e.cpp}::checks[] |
Definition at line 457 of file idle_e2e.cpp.
| char anonymous_namespace{idle_e2e.cpp}::detail[256] |
Definition at line 280 of file idle_e2e.cpp.
| int anonymous_namespace{idle_e2e.cpp}::failed |
Definition at line 279 of file idle_e2e.cpp.
Referenced by note().
|
constexpr |
Definition at line 42 of file idle_e2e.cpp.
Referenced by check_idle_arm_wake(), check_idle_clock(), check_idle_heartbeat(), check_idle_rx_while_asleep(), check_idle_tx_fail(), and check_idle_usb().
|
constexpr |
Definition at line 43 of file idle_e2e.cpp.
|
constexpr |
Definition at line 44 of file idle_e2e.cpp.
Referenced by ground_arm().
|
constexpr |
Definition at line 41 of file idle_e2e.cpp.
Referenced by check_idle_clock(), and run().
Definition at line 87 of file idle_e2e.cpp.
Referenced by on_usb(), poll_command(), radio_task(), read_battery(), send_heartbeat(), set_state(), and world_init().