1
0
forked from me/IronOS

Adding adc2 & new temperature calibration proceedures. [WiP] (#361)

* Add rough calls to ADC2 [untested]

* Using dual ADC injected modes

* Start both ADCs

* Move some IRQ's to ram exec

* Stabilize PID a bit more

* Add in ideas for tip type selection

* Add tiptype formula / settings struct

* Add function ids to the settings menu

* Rough tip selection

* Rough out new cal routine for simple tips

* Hardware test is fairly close for first pass

* Add Simple calibration case [UNTESTED]

This adds the calibration option that uses boiling water to the calibration menu.

This is untested, and may need gain adjustments before use.

* Simple Cal Roughly working

* Rough out advanced cal
This commit is contained in:
Ben V. Brown
2018-09-17 22:18:39 +10:00
committed by GitHub
parent b3947ccc1c
commit 056353ed6a
25 changed files with 1934 additions and 1555 deletions

View File

@@ -11,7 +11,7 @@
#define SETTINGS_H_
#include <stdint.h>
#include "stm32f1xx_hal.h"
#define SETTINGSVERSION 0x14 /*Change this if you change the struct below to prevent people getting out of sync*/
#define SETTINGSVERSION 0x15 /*Change this if you change the struct below to prevent people getting out of sync*/
/*
* This struct must be a multiple of 2 bytes as it is saved / restored from flash in uint16_t chunks
@@ -38,6 +38,8 @@ typedef struct {
uint8_t PID_I; //PID I Term
uint8_t PID_D; //PID D Term
uint8_t version; //Used to track if a reset is needed on firmware upgrade
uint8_t customTipGain; // Tip gain value if custom tuned, or 0 if using a tipType param
uint8_t tipType;
uint32_t padding; //This is here for in case we are not an even divisor so that nothing gets cut off
} systemSettingsType;