Trigger scope uses full buffer (#4893)

* trigger scope uses full buffer

* channels swapped on 4chan

* UI has custom names for boards
This commit is contained in:
Matthew Kennedy 2022-12-13 15:55:36 -08:00 committed by GitHub
parent 40738fad12
commit cfe2ca690b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 8 deletions

View File

@ -24,3 +24,6 @@
#define show_microRusEFI_presets false
#define show_Proteus_presets false
#define show_Hellen_presets true
#define TS_TRIGGER_SCOPE_CHANNEL_1_NAME "C2/C3 Crank VR"
#define TS_TRIGGER_SCOPE_CHANNEL_2_NAME "E5/E6 Cam VR"

View File

@ -3,10 +3,10 @@
#define TRIGGER_SCOPE_SAMPLE_TIME ADC_SAMPLE_144
// RES3
#define TRIGGER_SCOPE_PIN_CH1 Gpio::F8
#define TRIGGER_SCOPE_ADC_CH1 ADC_CHANNEL_IN6
#define TRIGGER_SCOPE_PIN_CH1 Gpio::F10
#define TRIGGER_SCOPE_ADC_CH1 ADC_CHANNEL_IN8
// RES2
#define TRIGGER_SCOPE_HAS_CH2 true
#define TRIGGER_SCOPE_PIN_CH2 Gpio::F10
#define TRIGGER_SCOPE_ADC_CH2 ADC_CHANNEL_IN8
#define TRIGGER_SCOPE_PIN_CH2 Gpio::F8
#define TRIGGER_SCOPE_ADC_CH2 ADC_CHANNEL_IN6

View File

@ -51,8 +51,7 @@ static const ADCConversionGroup adcConvGroupCh1 = { FALSE, 2, &completionCallbac
ADC_SQR3_SQ1_N(TRIGGER_SCOPE_ADC_CH1) | ADC_SQR3_SQ2_N(TRIGGER_SCOPE_ADC_CH2)
};
static constexpr size_t sampleCount = 1000;
static_assert(2 * sizeof(uint8_t) * sampleCount < BIG_BUFFER_SIZE);
static constexpr size_t sampleCount = BIG_BUFFER_SIZE / (2 * sizeof(uint8_t));
static void startSampling(void* = nullptr) {
chibios_rt::CriticalSectionLocker csl;

View File

@ -2112,6 +2112,10 @@ end_struct
#define TS_TRIGGER_SCOPE_DISABLE 5
#define TS_TRIGGER_SCOPE_READ 6
! Generic channel names, your board may want to override these
#define TS_TRIGGER_SCOPE_CHANNEL_1_NAME "Channel 1"
#define TS_TRIGGER_SCOPE_CHANNEL_2_NAME "Channel 2"
#define PROTOCOL_COIL1_SHORT_NAME "c1"
#define PROTOCOL_INJ1_SHORT_NAME "i1"

View File

@ -142,8 +142,8 @@ enable2ndByteCanID = false
continuousRead = true
recordDef = 0, 0, 2
recordField = channel1, "Channel 1", 0, 8, {6.6 / 255}, "v"
recordField = channel2, "Channel 2", 8, 8, {6.6 / 255}, "v"
recordField = channel1, @@TS_TRIGGER_SCOPE_CHANNEL_1_NAME@@, 0, 8, {6.6 / 255}, "v"
recordField = channel2, @@TS_TRIGGER_SCOPE_CHANNEL_2_NAME@@, 8, 8, {6.6 / 255}, "v"
[VeAnalyze]