* Remove unused includes * Adding in submodule * Move fusb functions to the BSP * Remove old code * Creating IronOS PD integration wrapper * Redirect to wrapper * pd lib updates * fix Docker build * Finish linking across * Cleanup * Update Makefile * Update push.yml * Update push.yml * PD -> Compensate for different tick rates * Update codeql-analysis.yml * Fix PD #define for @Firebie * Check irq low at start * Update BSP.h * Update main.cpp * Closer delay * Update OLED.cpp * Bugfix trying to start QC too early * Missing fusb shouldnt hang qc * Update FreeRTOSConfig.h * Update the GD drivers * Update Pinecil IRQ setup * Redirect printf() to uart * Update Power.cpp * Adding extras to PD state * Update USBPD.cpp * Delay in printf * Iterate once before delay on start * Update usb-pd * master usb-pd now * Format gd libs * Update gd32vf103_bkp.c * Guard with PD timeout * Remove CodeQL * Slow for testing, fix runt pulses at start * Fix runt pulse in read size 1 * Cleaner probing setup * Testing delay during stop gen in read 1 * Update I2C driver * Update gd32vf103_i2c.c * Cleaning up i2c wrapper a little, given up on dma for rx * Update preRTOS.cpp * Update Setup.cpp * Update MOVThread.cpp * Slow down UART to work with new clock config * Better ack setup for 2 byte read * Cleanup POW_PD so cant be lost in #includes * tipResistance -> TIP_RESISTANCE * handle NOP race on len==2 * Update configuration.h * Dont use neg timeout to mask anymore * Not required for MHP * Fix up source display Miniware * Fix race on PD init * Update POWThread.cpp * Update formatting * MHP format * Update push.yml * Faster TS80P I2C * Bugfix for IRQ handlers * Correctly handle I2C race on PD access * Fix CI error (unused var) and MHP IRQ * Test Pinecil alt ADC mode
152 lines
5.5 KiB
C
152 lines
5.5 KiB
C
#ifndef CONFIGURATION_H_
|
|
#define CONFIGURATION_H_
|
|
#include "Settings.h"
|
|
#include <stdint.h>
|
|
/**
|
|
* Configuration.h
|
|
* Define here your default pre settings for Pinecil
|
|
*
|
|
*/
|
|
|
|
//===========================================================================
|
|
//============================= Default Settings ============================
|
|
//===========================================================================
|
|
/**
|
|
* Default soldering temp is 320.0 C
|
|
* Temperature the iron sleeps at - default 150.0 C
|
|
*/
|
|
|
|
#define SLEEP_TEMP 150 // Default sleep temperature
|
|
#define BOOST_TEMP 420 // Default boost temp.
|
|
#define BOOST_MODE_ENABLED 1 // 0: Disable 1: Enable
|
|
|
|
/**
|
|
* Blink the temperature on the cooling screen when its > 50C
|
|
*/
|
|
#define COOLING_TEMP_BLINK 0 // 0: Disable 1: Enable
|
|
|
|
/**
|
|
* How many seconds/minutes we wait until going to sleep/shutdown.
|
|
* Values -> SLEEP_TIME * 10; i.e. 5*10 = 50 Seconds!
|
|
*/
|
|
#define SLEEP_TIME 5 // x10 Seconds
|
|
#define SHUTDOWN_TIME 10 // Minutes
|
|
|
|
/**
|
|
* Auto start off for safety.
|
|
* Pissible values are:
|
|
* 0 - none
|
|
* 1 - Soldering Temperature
|
|
* 2 - Sleep Temperature
|
|
* 3 - Sleep Off Temperature
|
|
*/
|
|
#define AUTO_START_MODE 0 // Default to none
|
|
|
|
/**
|
|
* Locking Mode
|
|
* When in soldering mode a long press on both keys toggle the lock of the buttons
|
|
* Possible values are:
|
|
* 0 - Desactivated
|
|
* 1 - Lock except boost
|
|
* 2 - Full lock
|
|
*/
|
|
#define LOCKING_MODE 0 // Default to desactivated for safety
|
|
|
|
/**
|
|
* OLED Orientation
|
|
*
|
|
*/
|
|
#define ORIENTATION_MODE 0 // 0: Right 1:Left 2:Automatic - Default right
|
|
#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assigment for temperature change
|
|
|
|
/**
|
|
* Temp change settings
|
|
*/
|
|
#define TEMP_CHANGE_SHORT_STEP 1 // Default temp change short step +1
|
|
#define TEMP_CHANGE_LONG_STEP 10 // Default temp change long step +10
|
|
#define TEMP_CHANGE_SHORT_STEP_MAX 50 // Temp change short step MAX value
|
|
#define TEMP_CHANGE_LONG_STEP_MAX 90 // Temp change long step MAX value
|
|
|
|
/* Power pulse for keeping power banks awake*/
|
|
#define POWER_PULSE_INCREMENT 1
|
|
#define POWER_PULSE_MAX 100 // x10 max watts
|
|
#define POWER_PULSE_WAIT_MAX 9 // 9*2.5s = 22.5 seconds
|
|
#define POWER_PULSE_DURATION_MAX 9 // 9*250ms = 2.25 seconds
|
|
|
|
#ifdef MODEL_Pinecil
|
|
#define POWER_PULSE_DEFAULT 0
|
|
#else
|
|
#define POWER_PULSE_DEFAULT 5
|
|
#endif
|
|
#define POWER_PULSE_WAIT_DEFAULT 4 // Default rate of the power pulse: 4*2500 = 10000 ms = 10 s
|
|
#define POWER_PULSE_DURATION_DEFAULT 1 // Default duration of the power pulse: 1*250 = 250 ms
|
|
|
|
/**
|
|
* OLED Orientation Sensitivity on Automatic mode!
|
|
* Motion Sensitivity <0=Off 1=Least Sensitive 9=Most Sensitive>
|
|
*/
|
|
#define SENSITIVITY 7 // Default 7
|
|
|
|
/**
|
|
* Detailed soldering screen
|
|
* Detailed idle screen (off for first time users)
|
|
*/
|
|
#define DETAILED_SOLDERING 0 // 0: Disable 1: Enable - Default 0
|
|
#define DETAILED_IDLE 0 // 0: Disable 1: Enable - Default 0
|
|
|
|
#define THERMAL_RUNAWAY_TIME_SEC 20
|
|
#define THERMAL_RUNAWAY_TEMP_C 20
|
|
|
|
#define CUT_OUT_SETTING 0 // default to no cut-off voltage
|
|
#define RECOM_VOL_CELL 33 // Minimum voltage per cell (Recommended 3.3V (33))
|
|
#define TEMPERATURE_INF 0 // default to 0
|
|
#define DESCRIPTION_SCROLL_SPEED 0 // 0: Slow 1: Fast - default to slow
|
|
#define ANIMATION_LOOP 1 // 0: off 1: on
|
|
#define ANIMATION_SPEED settingOffSpeed_t::MEDIUM
|
|
|
|
#define OP_AMP_Rf_Pinecil 750 * 1000 // 750 Kilo-ohms -> From schematic, R1
|
|
#define OP_AMP_Rin_Pinecil 2370 // 2.37 Kilo-ohms -> From schematic, R2
|
|
|
|
#define OP_AMP_GAIN_STAGE_PINECIL (1 + (OP_AMP_Rf_Pinecil / OP_AMP_Rin_Pinecil))
|
|
|
|
#if defined(MODEL_Pinecil) == 0
|
|
#error "No model defined!"
|
|
#endif
|
|
|
|
#ifdef MODEL_Pinecil
|
|
#define SOLDERING_TEMP 320 // Default soldering temp is 320.0 °C
|
|
#define VOLTAGE_DIV 467 // 467 - Default divider from schematic
|
|
#define CALIBRATION_OFFSET 900 // 900 - Default adc offset in uV
|
|
#define PID_POWER_LIMIT 70 // Sets the max pwm power limit
|
|
#define POWER_LIMIT 0 // 0 watts default limit
|
|
#define MAX_POWER_LIMIT 70 //
|
|
#define POWER_LIMIT_STEPS 5 //
|
|
#define OP_AMP_GAIN_STAGE OP_AMP_GAIN_STAGE_PINECIL // Uses TS100 resistors
|
|
#define TEMP_uV_LOOKUP_HAKKO // Use Hakko lookup table
|
|
#define USB_PD_VMAX 20 // Maximum voltage for PD to negotiate
|
|
#define PID_TIM_HZ (8) // Tick rate of the PID loop
|
|
#define MAX_TEMP_C 450 // Max soldering temp selectable °C
|
|
#define MAX_TEMP_F 850 // Max soldering temp selectable °F
|
|
#define MIN_TEMP_C 10 // Min soldering temp selectable °C
|
|
#define MIN_TEMP_F 60 // Min soldering temp selectable °F
|
|
#define MIN_BOOST_TEMP_C 250 // The min settable temp for boost mode °C
|
|
#define MIN_BOOST_TEMP_F 480 // The min settable temp for boost mode °F
|
|
|
|
#define POW_PD 1
|
|
#define POW_QC 1
|
|
#define POW_DC 1
|
|
#define POW_QC_20V 1
|
|
#define ENABLE_QC2 1
|
|
#define TEMP_TMP36
|
|
#define ACCEL_BMA
|
|
#define ACCEL_SC7
|
|
#define HALL_SENSOR
|
|
#define HALL_SI7210
|
|
#define DEBUG_UART_OUTPUT
|
|
|
|
#define HARDWARE_MAX_WATTAGE_X10 750
|
|
#define TIP_THERMAL_MASS 65 // X10 watts to raise 1 deg C in 1 second
|
|
#define TIP_RESISTANCE 75 // x10 ohms, 7.5 typical for Pinecil tips
|
|
#endif
|
|
#endif
|