wideband/firmware/wideband_config.h

58 lines
1.4 KiB
C
Raw Normal View History

2020-10-30 02:03:12 -07:00
#pragma once
2021-12-27 20:42:57 -08:00
#include "io_pins.h"
2022-01-28 11:21:38 -08:00
#include "wideband_board_config.h"
2020-10-30 02:03:12 -07:00
// *******************************
// Defaults
// *******************************
#ifndef EGT_CHANNELS
#define EGT_CHANNELS 0
#endif
2020-10-30 02:03:12 -07:00
// *******************************
// Nernst voltage & ESR sense
// *******************************
2021-06-03 20:50:39 -07:00
// Heater low pass filter
#define ESR_SENSE_ALPHA (0.002f)
2020-10-30 02:03:12 -07:00
// *******************************
// Pump current sense
// *******************************
#define PUMP_CURRENT_SENSE_GAIN (10)
// LSU sense resistor - 61.9 ohms
#define LSU_SENSE_R (61.9f)
2020-12-15 14:41:09 -08:00
// Pump low pass filter alpha
2021-06-03 20:50:39 -07:00
// sampling at 2.5khz, alpha of 0.01 gives about 50hz bandwidth
#define PUMP_FILTER_ALPHA (0.02f)
2020-12-15 14:41:09 -08:00
2020-10-30 02:03:12 -07:00
// *******************************
2020-10-31 16:59:35 -07:00
// Pump controller
2020-10-30 02:03:12 -07:00
// *******************************
2020-10-31 16:59:35 -07:00
#define NERNST_TARGET (0.45f)
2020-10-31 14:58:34 -07:00
// *******************************
// Heater controller config
// *******************************
#define HEATER_CONTROL_PERIOD 50
2020-12-10 22:08:00 -08:00
#define HEATER_PREHEAT_TIME 5000
2022-01-10 01:46:43 -08:00
#define HEATER_WARMUP_TIMEOUT 60000
2020-12-10 22:08:00 -08:00
#define HEATER_BATTERY_STAB_TIME 500
// minimal battery voltage to start heating without CAN command
#define HEATER_BATTERY_ON_VOLTAGE 9.5
// mininal battery voltage to continue heating
#define HEATER_BATTETY_OFF_VOLTAGE 8.5
// *******************************
// TunerStudio configuration
// *******************************
#if defined(TS_PRIMARY_UART_PORT) || defined(TS_PRIMARY_SERIAL_PORT)
#define TS_ENABLED
#endif