STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
idle_task.h
Go to the documentation of this file.
1
#ifndef STAR_IDLE_TASK_H
2
#define STAR_IDLE_TASK_H
3
4
/*
5
* The Idle loop on the board: Aaron's idle.c (PR #162, src/app/IDLE.md) with
6
* the real adapters, sleeping in Stop between heartbeats (board_sleep).
7
*
8
* read_battery board_bringup_read_battery (PA0, mean of 16)
9
* on_usb_power board_bringup_on_usb (SW_ST, PE10)
10
* send_heartbeat Ryan's Heartbeat frame over the radio task, PASS only
11
* after TxDone: state u8 (IDLE), battery_mV u16 (0 on
12
* USB or an unread ADC: never USB's 5 V as the pack),
13
* uptime_s u32 (src/radio/frame.h). The previous-send result
14
* and failure count do not fit the 7-byte frame (#162
15
* open question 3).
16
* poll_command commands the radio task's ARM gate confirmed
17
* An Arm -> ARM_REQUESTED -> app_set_state(ARMED): sensors, GPS and the
18
* eMMC log start. ARMED is "record", never pyro.
19
* LED1 is on while the board is awake in Idle: one short flash every 10 s.
20
*/
21
22
#include <stdbool.h>
23
24
#include "
idle.h
"
25
#include "
mode_core.h
"
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
31
bool
idle_task_start
(
void
);
32
void
idle_task_set_active
(
bool
on);
33
void
idle_task_command
(
mode_command_t
command);
34
35
/* The Idle instance, read-only (last heartbeat, schedule). */
36
const
idle_t
*
idle_task_state
(
void
);
37
38
#ifdef __cplusplus
39
}
40
#endif
41
#endif
idle.h
idle_task_set_active
void idle_task_set_active(bool on)
Definition
idle_task.c:124
idle_task_state
const idle_t * idle_task_state(void)
Definition
idle_task.c:138
idle_task_start
bool idle_task_start(void)
Definition
idle_task.c:113
idle_task_command
void idle_task_command(mode_command_t command)
Definition
idle_task.c:131
mode_core.h
mode_command_t
mode_command_t
Definition
mode_core.h:43
idle_t
Definition
idle.h:51
firmware
Flight_Computer
src
app
idle_task.h
Generated by
1.15.0