STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
anonymous_namespace{idle_e2e.cpp} Namespace Reference

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 []

Function Documentation

◆ beats()

◆ check_idle_arm_wake()

◆ check_idle_clock()

void anonymous_namespace{idle_e2e.cpp}::check_idle_clock ( )

◆ check_idle_heartbeat()

void anonymous_namespace{idle_e2e.cpp}::check_idle_heartbeat ( )

◆ check_idle_rx_while_asleep()

void anonymous_namespace{idle_e2e.cpp}::check_idle_rx_while_asleep ( )

◆ check_idle_tx_fail()

◆ check_idle_usb()

◆ ground_arm()

void anonymous_namespace{idle_e2e.cpp}::ground_arm ( World & w,
uint32_t t,
uint16_t seq )

◆ no_card()

emmc_status_t anonymous_namespace{idle_e2e.cpp}::no_card ( void * ,
uint32_t * n )

Definition at line 205 of file idle_e2e.cpp.

References EMMC_OK.

Referenced by world_init().

◆ no_io()

emmc_status_t anonymous_namespace{idle_e2e.cpp}::no_io ( void * ,
uint32_t ,
void * ,
uint32_t ,
uint32_t  )

Definition at line 209 of file idle_e2e.cpp.

References EMMC_OK.

Referenced by world_init().

◆ no_write()

emmc_status_t anonymous_namespace{idle_e2e.cpp}::no_write ( void * ,
uint32_t ,
const void * ,
uint32_t ,
uint32_t  )

Definition at line 212 of file idle_e2e.cpp.

References EMMC_OK.

Referenced by world_init().

◆ note()

void anonymous_namespace{idle_e2e.cpp}::note ( const char * fmt,
... )

◆ on_usb()

bool anonymous_namespace{idle_e2e.cpp}::on_usb ( void * )

Definition at line 115 of file idle_e2e.cpp.

References W.

Referenced by world_init().

◆ poll_command()

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().

◆ radio_task()

void anonymous_namespace{idle_e2e.cpp}::radio_task ( )

◆ read_battery()

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().

◆ run()

◆ send_heartbeat()

◆ set_state()

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().

◆ world_init()

Variable Documentation

◆ checks

const Check anonymous_namespace{idle_e2e.cpp}::checks[]
Initial value:
= {
{"idle_heartbeat",
"Idle: a LoRa heartbeat every 10 s, 7.92 V, decoded by Ryan's frames",
{"idle_rx_asleep",
"Idle: radio sniffing (duty cycle, RF_SW) through every sleep",
{"idle_arm_wake",
"Idle: ground Arm wakes on DIO1 -> ARMED, sensors + eMMC start",
{"idle_usb", "Idle on USB: heartbeats never report USB's 5 V as the pack",
{"idle_tx_fail",
"Idle: TxDone timeouts counted, no retry storm, radio back in RX",
{"idle_clock", "Idle: RTC on a 30.5 kHz LSI, board clock still true time",
}

Definition at line 457 of file idle_e2e.cpp.

◆ detail

char anonymous_namespace{idle_e2e.cpp}::detail[256]

Definition at line 280 of file idle_e2e.cpp.

◆ failed

int anonymous_namespace{idle_e2e.cpp}::failed

Definition at line 279 of file idle_e2e.cpp.

Referenced by note().

◆ kBootMs

uint32_t anonymous_namespace{idle_e2e.cpp}::kBootMs = 5000
constexpr

◆ kCounts7V92

uint32_t anonymous_namespace{idle_e2e.cpp}::kCounts7V92 = 48853
constexpr

Definition at line 43 of file idle_e2e.cpp.

◆ kTargetId

uint8_t anonymous_namespace{idle_e2e.cpp}::kTargetId = 0x01
constexpr

Definition at line 44 of file idle_e2e.cpp.

Referenced by ground_arm().

◆ kTrueLsiHz

uint32_t anonymous_namespace{idle_e2e.cpp}::kTrueLsiHz = 30500
constexpr

Definition at line 41 of file idle_e2e.cpp.

Referenced by check_idle_clock(), and run().

◆ W

World* anonymous_namespace{idle_e2e.cpp}::W = nullptr