|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include "fake_baro.h"#include "fake_regs.h"#include "sensors_core.h"Go to the source code of this file.
Classes | |
| struct | sink_t |
| struct | rig_t |
Macros | |
| #define | CHECK(c) |
| #define | kWakeLatencyUs 37U /* a real task runs a little after its IRQ */ |
Functions | |
| static void | record (void *ctx, uint8_t type, const void *data, uint8_t len) |
| static void | rig_init (rig_t *r, uint32_t start_us) |
| static int32_t | diff (uint32_t a, uint32_t b) |
| static void | run (rig_t *r, uint32_t until) |
| static void | test_nominal_rates_values_and_timestamps (void) |
| static void | test_highg_without_edges_is_read_on_timeout (void) |
| static void | test_failing_imu_is_dropped_and_recovered (void) |
| static void | test_wrong_chip_never_produces_and_keeps_retrying (void) |
| static void | test_dead_baro_bus_is_reported (void) |
| static void | test_stop_powers_down_and_init_restarts (void) |
| static void | test_wait_never_overshoots_a_deadline (void) |
| static void | test_clock_wrap_is_harmless (void) |
| int | main (void) |
| #define CHECK | ( | c | ) |
Definition at line 13 of file test_sensors_core.c.
Referenced by test_clock_wrap_is_harmless(), test_dead_baro_bus_is_reported(), test_failing_imu_is_dropped_and_recovered(), test_highg_without_edges_is_read_on_timeout(), test_nominal_rates_values_and_timestamps(), test_stop_powers_down_and_init_restarts(), test_wait_never_overshoots_a_deadline(), and test_wrong_chip_never_produces_and_keeps_retrying().
Definition at line 91 of file test_sensors_core.c.
Referenced by run().
|
static |
Definition at line 93 of file test_sensors_core.c.
Referenced by fsw::calibration::IMUCalibration::calibrateGyroZeroVelocity(), ADS126X::check_checksum(), fsw::calibration::IMUCalibration::detectDrift(), fsw::script::anonymous_namespace{Validate.cpp}::nearest(), run(), and SensorSelfTest::run_adc_self_test().
| int main | ( | void | ) |
Definition at line 246 of file test_sensors_core.c.
References test_clock_wrap_is_harmless(), test_dead_baro_bus_is_reported(), test_failing_imu_is_dropped_and_recovered(), test_highg_without_edges_is_read_on_timeout(), test_nominal_rates_values_and_timestamps(), test_stop_powers_down_and_init_restarts(), test_wait_never_overshoots_a_deadline(), and test_wrong_chip_never_produces_and_keeps_retrying().
|
static |
Definition at line 30 of file test_sensors_core.c.
References sink_t::baro, sink_t::highg, sink_t::imu, sink_t::last_t, sink_t::n, sink_t::non_monotonic, REC_BARO, rec_baro_t, REC_HIGHG, rec_highg_t, REC_IMU, and rec_imu_t.
|
static |
Definition at line 60 of file test_sensors_core.c.
References fake_baro_bus(), fake_baro_datasheet_prom, fake_regs_bus(), fake_regs_init(), r, record(), sensors_core_init(), SENSORS_HIGHG_PERIOD_US, and SENSORS_IMU_PERIOD_US.
Referenced by test_clock_wrap_is_harmless(), test_dead_baro_bus_is_reported(), test_failing_imu_is_dropped_and_recovered(), test_highg_without_edges_is_read_on_timeout(), test_nominal_rates_values_and_timestamps(), test_stop_powers_down_and_init_restarts(), test_wait_never_overshoots_a_deadline(), and test_wrong_chip_never_produces_and_keeps_retrying().
|
static |
Definition at line 101 of file test_sensors_core.c.
References diff(), kWakeLatencyUs, r, sensors_core_step(), sensors_core_wait_us(), SENSORS_EV_HIGHG, SENSORS_EV_IMU, SENSORS_HIGHG_PERIOD_US, SENSORS_IMU_PERIOD_US, and until().
|
static |
Definition at line 237 of file test_sensors_core.c.
References CHECK, r, and rig_init().
Referenced by main().
|
static |
Definition at line 198 of file test_sensors_core.c.
References CHECK, DEV_ERR_BUS, r, and rig_init().
Referenced by main().
|
static |
Definition at line 164 of file test_sensors_core.c.
References CHECK, DEV_ERR_BUS, r, rig_init(), SENSORS_MAX_ERRORS, and SENSORS_RETRY_US.
Referenced by main().
|
static |
Definition at line 153 of file test_sensors_core.c.
References CHECK, r, and rig_init().
Referenced by main().
|
static |
Definition at line 131 of file test_sensors_core.c.
References CHECK, r, and rig_init().
Referenced by main().
|
static |
Definition at line 209 of file test_sensors_core.c.
References CHECK, r, rig_init(), sensors_core_init(), sensors_core_stop(), SENSORS_HIGHG_PERIOD_US, and SENSORS_IMU_PERIOD_US.
Referenced by main().
|
static |
Definition at line 229 of file test_sensors_core.c.
References CHECK, r, rig_init(), SENSORS_BARO_STEP_US, sensors_core_wait_us(), and SENSORS_IMU_PERIOD_US.
Referenced by main().
|
static |
Definition at line 185 of file test_sensors_core.c.
References CHECK, DEV_ERR_ID, r, rig_init(), and SENSORS_RETRY_US.
Referenced by main().