mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Setup for temp reading
This commit is contained in:
@@ -53,6 +53,7 @@ static const uint16_t NTCHandleLookup[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
uint16_t getHandleTemperature(uint8_t sample) {
|
uint16_t getHandleTemperature(uint8_t sample) {
|
||||||
|
#ifdef TMP36_ADC1_CHANNEL
|
||||||
int32_t result = getADCHandleTemp(sample);
|
int32_t result = getADCHandleTemp(sample);
|
||||||
// S60 uses 10k NTC resistor
|
// S60 uses 10k NTC resistor
|
||||||
// For now not doing interpolation
|
// For now not doing interpolation
|
||||||
@@ -62,6 +63,9 @@ uint16_t getHandleTemperature(uint8_t sample) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 45 * 10;
|
return 45 * 10;
|
||||||
|
#else
|
||||||
|
return 0; // Not implemented
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t getInputVoltageX10(uint16_t divisor, uint8_t sample) {
|
uint16_t getInputVoltageX10(uint16_t divisor, uint8_t sample) {
|
||||||
|
|||||||
@@ -73,19 +73,21 @@
|
|||||||
|
|
||||||
#ifdef MODEL_T55
|
#ifdef MODEL_T55
|
||||||
|
|
||||||
#define KEY_B_Pin GPIO_PIN_1
|
#define KEY_A_Pin GPIO_PIN_1
|
||||||
#define KEY_B_GPIO_Port GPIOB
|
#define KEY_A_GPIO_Port GPIOB
|
||||||
// No cold junction compensation as its a PT1000
|
// No cold junction compensation as its a PT1000
|
||||||
#define TIP_TEMP_Pin GPIO_PIN_5
|
#define TIP_TEMP_Pin GPIO_PIN_5
|
||||||
#define TIP_TEMP_GPIO_Port GPIOA
|
#define TIP_TEMP_GPIO_Port GPIOA
|
||||||
#define TIP_TEMP_ADC1_CHANNEL ADC_CHANNEL_5
|
#define TIP_TEMP_ADC1_CHANNEL ADC_CHANNEL_5
|
||||||
#define TIP_TEMP_ADC2_CHANNEL ADC_CHANNEL_5
|
#define TIP_TEMP_ADC2_CHANNEL ADC_CHANNEL_5
|
||||||
|
|
||||||
#define VIN_Pin GPIO_PIN_4
|
#define VIN_Pin GPIO_PIN_4
|
||||||
#define VIN_GPIO_Port GPIOA
|
#define VIN_GPIO_Port GPIOA
|
||||||
#define VIN_ADC1_CHANNEL ADC_CHANNEL_4
|
#define VIN_ADC1_CHANNEL ADC_CHANNEL_4
|
||||||
#define VIN_ADC2_CHANNEL ADC_CHANNEL_4
|
#define VIN_ADC2_CHANNEL ADC_CHANNEL_4
|
||||||
#define KEY_A_Pin GPIO_PIN_0
|
#define KEY_B_Pin GPIO_PIN_0
|
||||||
#define KEY_A_GPIO_Port GPIOB
|
#define KEY_B_GPIO_Port GPIOB
|
||||||
|
|
||||||
#define PWM_Out_Pin GPIO_PIN_8
|
#define PWM_Out_Pin GPIO_PIN_8
|
||||||
#define PWM_Out_GPIO_Port GPIOB
|
#define PWM_Out_GPIO_Port GPIOB
|
||||||
#define PWM_Out_CHANNEL TIM_CHANNEL_3 // Timer 4; channel 3
|
#define PWM_Out_CHANNEL TIM_CHANNEL_3 // Timer 4; channel 3
|
||||||
|
|||||||
@@ -206,24 +206,31 @@
|
|||||||
// Hold back left button for "DFU"
|
// Hold back left button for "DFU"
|
||||||
|
|
||||||
#define VOLTAGE_DIV 460 // Default divider scaler
|
#define VOLTAGE_DIV 460 // Default divider scaler
|
||||||
#define CALIBRATION_OFFSET 200 // Default adc offset in uV
|
#define CALIBRATION_OFFSET 0 // Default adc offset in uV
|
||||||
#define PID_POWER_LIMIT 70 // Sets the max pwm power limit
|
#define PID_POWER_LIMIT 70 // Sets the max pwm power limit
|
||||||
#define POWER_LIMIT 0 // 0 watts default limit
|
#define POWER_LIMIT 0 // 0 watts default limit
|
||||||
#define MAX_POWER_LIMIT 70
|
#define MAX_POWER_LIMIT 70
|
||||||
#define POWER_LIMIT_STEPS 5
|
#define POWER_LIMIT_STEPS 5
|
||||||
#define OP_AMP_GAIN_STAGE 536
|
#define OP_AMP_GAIN_STAGE 1
|
||||||
#define TEMP_uV_LOOKUP_PT1000
|
#define TEMP_uV_LOOKUP_PT1000
|
||||||
#define USB_PD_VMAX 20 // Maximum voltage for PD to negotiate
|
#define USB_PD_VMAX 20 // Maximum voltage for PD to negotiate
|
||||||
#define NO_DISPLAY_ROTATE // Disable OLED rotation by accel
|
#define NO_DISPLAY_ROTATE // Disable OLED rotation by accel
|
||||||
|
#define MAX_TEMP_C 350 // Max soldering temp selectable °C
|
||||||
#define HARDWARE_MAX_WATTAGE_X10 600
|
#define MAX_TEMP_F 660 // Max soldering temp selectable °F
|
||||||
|
#define MIN_TEMP_C 10 // Min soldering temp selectable °C
|
||||||
|
#define MIN_TEMP_F 50 // Min soldering temp selectable °F
|
||||||
|
#define MIN_BOOST_TEMP_C 150 // The min settable temp for boost mode °C
|
||||||
|
#define MIN_BOOST_TEMP_F 300 // The min settable temp for boost mode °F
|
||||||
|
#define NO_SLEEP_MODE
|
||||||
|
#define HARDWARE_MAX_WATTAGE_X10 850
|
||||||
|
|
||||||
#define TIP_THERMAL_MASS 10 // X10 watts to raise 1 deg C in 1 second
|
#define TIP_THERMAL_MASS 10 // X10 watts to raise 1 deg C in 1 second
|
||||||
#define TIP_THERMAL_INERTIA 128 // We use a large inertia value to smooth out the drive to the tip since its stupidly sensitive
|
#define TIP_THERMAL_INERTIA 128 // We use a large inertia value to smooth out the drive to the tip since its stupidly sensitive
|
||||||
|
|
||||||
#define TIP_RESISTANCE 52 // PCB heater, measured at ~19C. Will shift by temp a decent amount
|
#define TIP_RESISTANCE 52 // PCB heater, measured at ~19C. Will shift by temp a decent amount
|
||||||
|
|
||||||
#define OLED_128x32
|
#define PROFILE_SUPPORT 1 // Soldering Profiles
|
||||||
|
#define OLED_128x32 1 // Larger OLED
|
||||||
#define OLED_FLIP 1 // Mounted upside down
|
#define OLED_FLIP 1 // Mounted upside down
|
||||||
#define POW_PD_EXT 1 // Older HUB238
|
#define POW_PD_EXT 1 // Older HUB238
|
||||||
#define USB_PD_EPR_WATTAGE 0 /*No EPR*/
|
#define USB_PD_EPR_WATTAGE 0 /*No EPR*/
|
||||||
|
|||||||
Reference in New Issue
Block a user