ACS Firmware Documentation
Attitude Control System Capstone 2018 for db@reSat
|
#include "acs.h"
Go to the source code of this file.
Macros | |
#define | EVENT_COUNT (int)(sizeof(trap)/sizeof(acs_trap)) |
determines the total number of events More... | |
#define | TRANS_COUNT (int)(sizeof(trans)/sizeof(acs_transition)) |
TRANS_COUNT define the total number of legal transitions. More... | |
Functions | |
static void | trans_cleanup (ACS *acs) |
cleans up on transition More... | |
static void | update_recv (ACS *acs, int recv_byte) |
updates the recv buffer More... | |
static int | state_off (ACS *acs) |
returns the off state More... | |
static int | state_init (ACS *acs) |
returns the init state More... | |
static int | state_rdy (ACS *acs) |
returns the ready state More... | |
static int | state_rw (ACS *acs) |
return the reaction wheel state More... | |
static int | state_mtqr (ACS *acs) |
returns the magnetorquer state More... | |
static int | trap_rw_start (ACS *acs) |
function to start the the reaction wheels More... | |
static int | trap_rw_stop (ACS *acs) |
function to stop the reaction wheels More... | |
static int | trap_mtqr_start (ACS *acs) |
function to start the magnetorquer More... | |
static int | trap_mtqr_stop (ACS *acs) |
function to stop the magnetorquer More... | |
static int | trap_mtqr_dc (ACS *acs) |
function to change the PWM duty cycle for the magnetorquer More... | |
static int | trap_mtqr_dir (ACS *acs) |
function for function for changing the polarity of the magnetorquer More... | |
static int | trap_rw_stretch (ACS *acs) |
Changes how many steps are added in between each LUT step. More... | |
static int | trap_rw_control (ACS *acs) |
Closed loop using encoder, or brute forcing with open loop. More... | |
static int | trap_rw_skip (ACS *acs) |
Changes how many steps are skipped in the LUT when going to next step. More... | |
static int | trap_rw_scale (ACS *acs) |
Changes the scale factor, modifying LUT value by 0-100%. More... | |
static int | fsm_trap (ACS *acs) |
control falls here when a state change request is unrecognized More... | |
static acs_event | getNextEvent (ACS *acs) |
waits for events on the CAN bus and processes them More... | |
static int | acs_statemachine (ACS *acs) |
the ACS state machine More... | |
int | acsInit (ACS *acs) |
general ACS initialization More... | |
THD_WORKING_AREA (wa_acsThread, WA_ACS_THD_SIZE) | |
ACS thread and thread working area. More... | |
THD_FUNCTION (acsThread, acs) | |
Variables | |
event_listener_t | el |
const acs_trap | trap [] |
trap function table More... | |
const acs_transition | trans [] |
state transition table More... | |
#define TRANS_COUNT (int)(sizeof(trans)/sizeof(acs_transition)) |
TRANS_COUNT define the total number of legal transitions.
|
static |
the ACS state machine
|
static |
control falls here when a state change request is unrecognized
waits for events on the CAN bus and processes them
|
static |
|
static |
returns the magnetorquer state
|
static |
|
static |
returns the ready state
|
static |
return the reaction wheel state
THD_FUNCTION | ( | acsThread | , |
acs | |||
) |
THD_WORKING_AREA | ( | wa_acsThread | , |
WA_ACS_THD_SIZE | |||
) |
ACS thread and thread working area.
|
static |
cleans up on transition
|
static |
function to change the PWM duty cycle for the magnetorquer
|
static |
function for function for changing the polarity of the magnetorquer
|
static |
function to start the magnetorquer
|
static |
function to stop the magnetorquer
|
static |
|
static |
|
static |
Changes how many steps are skipped in the LUT when going to next step.
|
static |
function to start the the reaction wheels
|
static |
function to stop the reaction wheels
|
static |
|
static |
updates the recv buffer
event_listener_t el |
const acs_transition trans[] |
state transition table
this state transistion table defines legal transitions and and what function is called upon a successful match in the table.
const acs_trap trap[] |
trap function table
this table defines the events allowed to be called in states, and the function that needs to be called on a successful match