#include "main.h"
#include <Arduino.h>
#include <Ethernet.h>
#include <EthernetUdp.h>
#include <SPI.h>
#include <daq-protocol.h>
#include <esp_mac.h>
#include <cstring>
#include <vector>
#include "STAR_ADS126X.h"
#include "sense_board_pins.h"
#include "connector_adc_map.h"
#include "adc_mappings.h"
#include "SensorHotfireCore.h"
#include "SensorSelfTest.h"
Go to the source code of this file.
|
| | ADS126X_ASSERT_FILTER_RATE (FILTER, DATA_RATE) |
| SPIClass | ADC_SPI (HSPI) |
| static void | flush_cycles (int cycles) |
| static void | collect_chunk_impl () |
| static void | send_chunks_to_impl (IPAddress dest_ip, int dest_port, bool also_to_abort_controller, IPAddress abort_controller_ip, int abort_controller_port) |
| static void | init_adc_cb (void *) |
| static void | on_reference_voltage_cb (void *, uint8_t reference_voltage) |
| static void | collect_chunk_cb (void *) |
| static void | send_chunks_to_cb (void *, IPAddress dest_ip, int dest_port, bool also_to_abort_controller, IPAddress abort_controller_ip, int abort_controller_port) |
| static void | run_self_test_cb (void *, const SensorHotfire::StoredSensorConfig &cfg, std::vector< daq::SelfTestResult > &results_out) |
| void | setup () |
| void | loop () |
◆ DATA_RATE
◆ FILTER
◆ NUM_CHANNELS
◆ PINS_ACTIVE_LAYOUT
TC (Thermocouple) Hotfire state machine — ESP32 PCB.
Same state machine as PT Hotfire: Waiting for Server → Active → Standalone Abort (and back to Active on clear). Sends heartbeats, streams thermocouple/sensor data to server or to actuator controller in abort. Uses TC_Board pin layout and BoardType::THERMOCOUPLE. Uses shared SensorHotfireCore; board-specific: ADC init, collect_chunk, send_chunks_to.
Definition at line 27 of file main.cpp.
◆ TEST_PIN
◆ ADC_SPI()
| SPIClass ADC_SPI |
( |
HSPI | | ) |
|
◆ ADS126X_ASSERT_FILTER_RATE()
◆ collect_chunk_cb()
| void collect_chunk_cb |
( |
void * | | ) |
|
|
static |
◆ collect_chunk_impl()
| void collect_chunk_impl |
( |
| ) |
|
|
static |
Definition at line 69 of file main.cpp.
References ads126x, ADS126X_AINCOM, chunk, coreState, dataChunks, delayMicroseconds(), digitalRead(), sense_board_pins::getAdcChannel(), LOW, millis(), sense_board_pins::Pins, SENSOR_MAX_CHUNKS_BEFORE_SEND, and TEST_PIN.
Referenced by collect_chunk_cb().
◆ flush_cycles()
| void flush_cycles |
( |
int | cycles | ) |
|
|
static |
◆ init_adc_cb()
| void init_adc_cb |
( |
void * | | ) |
|
|
static |
Definition at line 154 of file main.cpp.
References ADC_SPI(), ads126x, ADS126X_AINCOM, ADS126X_REF_NEG_VSS, ADS126X_REF_POS_INT, DATA_RATE, FILTER, sense_board_pins::getAdcChannel(), INPUT, pinMode(), sense_board_pins::Pins, SPI_MODE1, and TEST_PIN.
◆ loop()
◆ on_reference_voltage_cb()
| void on_reference_voltage_cb |
( |
void * | , |
|
|
uint8_t | reference_voltage ) |
|
static |
◆ run_self_test_cb()
Definition at line 188 of file main.cpp.
References ads126x, ADS126X_AINCOM, ADS126X_REF_NEG_VSS, ADS126X_REF_POS_INT, SensorSelfTest::CONNECTED, sense_board_pins::getAdcChannel(), sense_board_pins::Pins, SensorSelfTest::read_sensor_bias(), SensorSelfTest::run_adc_self_test(), SensorSelfTest::sensor_bias_disable(), SensorSelfTest::sensor_bias_enable(), and TEST_PIN.
◆ send_chunks_to_cb()
| void send_chunks_to_cb |
( |
void * | , |
|
|
IPAddress | dest_ip, |
|
|
int | dest_port, |
|
|
bool | also_to_abort_controller, |
|
|
IPAddress | abort_controller_ip, |
|
|
int | abort_controller_port ) |
|
static |
◆ send_chunks_to_impl()
| void send_chunks_to_impl |
( |
IPAddress | dest_ip, |
|
|
int | dest_port, |
|
|
bool | also_to_abort_controller, |
|
|
IPAddress | abort_controller_ip, |
|
|
int | abort_controller_port ) |
|
static |
Definition at line 92 of file main.cpp.
References chunk, coreState, daq::create_sensor_data_packet(), dataChunks, g_last_sensor_packet_log_ms, HF_VERBOSE, HF_VERBOSELN, HF_VERBOSELN_, millis(), packetBuffer, SENSOR_HOTFIRE_MAX_PACKET_SIZE, and SENSOR_MAX_CHUNKS_BEFORE_SEND.
Referenced by send_chunks_to_cb().
◆ setup()
◆ ads126x
◆ coreConfig
◆ coreState
◆ dataChunks
◆ g_last_sensor_packet_log_ms
| unsigned long g_last_sensor_packet_log_ms = 0 |
|
static |
◆ g_verbose