mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Quick fix for multiple definition of structs (#33)
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#include "Settings.h"
|
||||
#include "Analog.h"
|
||||
#include <string.h>
|
||||
enum {
|
||||
typedef enum {
|
||||
STARTUP, //we are sitting on the prompt to push a button
|
||||
SOLDERING, //Normal operating mode
|
||||
TEMP_ADJ, //Adjust the set temperature
|
||||
@@ -29,10 +29,10 @@ enum {
|
||||
DCINDISP, //Disp the input voltage && Cal the DCin voltage divider
|
||||
TEMPCAL, //Cal tip temp offset
|
||||
|
||||
} operatingMode;
|
||||
} operatingModeEnum;
|
||||
#define SETTINGSOPTIONSCOUNT 10 /*Number of settings in the settings menu*/
|
||||
|
||||
enum {
|
||||
typedef enum {
|
||||
UVCO = 0,
|
||||
SLEEP_TEMP,
|
||||
SLEEP_TIME,
|
||||
@@ -44,7 +44,7 @@ enum {
|
||||
LEFTY,
|
||||
BOOSTMODE,
|
||||
BOOSTTEMP,
|
||||
} settingsPage;
|
||||
} settingsPageEnum;
|
||||
|
||||
void ProcessUI();
|
||||
void DrawUI();
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
#include "Analog.h"
|
||||
#include "Interrupt.h"
|
||||
|
||||
struct {
|
||||
typedef struct {
|
||||
uint32_t kp, ki, kd; //PID values
|
||||
} pidSettings;
|
||||
} pidSettingsType;
|
||||
|
||||
int32_t computePID(uint16_t setpoint);
|
||||
void setupPID(void);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/*
|
||||
* This struct must be a multiple of 2 bytes as it is saved / restored from flash in uint16_t chunks
|
||||
*/
|
||||
struct {
|
||||
typedef struct {
|
||||
uint16_t SolderingTemp; //current set point for the iron
|
||||
uint32_t SleepTemp; //temp to drop to in sleep
|
||||
uint8_t version; //Used to track if a reset is needed on firmware upgrade
|
||||
@@ -42,7 +42,9 @@ struct {
|
||||
uint16_t tempCalibration; //Temperature calibration value
|
||||
uint16_t voltageDiv; //Voltage divisor factor
|
||||
uint16_t BoostTemp; //Boost mode set point for the iron
|
||||
} systemSettings;
|
||||
} systemSettingsType;
|
||||
|
||||
extern systemSettingsType systemSettings;
|
||||
|
||||
void saveSettings();
|
||||
void restoreSettings();
|
||||
|
||||
@@ -17,6 +17,10 @@ const char *SettingsLongNames[] = {
|
||||
" Temperature when in boost mode" };
|
||||
uint8_t StatusFlags = 0;
|
||||
uint32_t temporaryTempStorage = 0;
|
||||
|
||||
operatingModeEnum operatingMode;
|
||||
settingsPageEnum settingsPage;
|
||||
|
||||
//This does the required processing and state changes
|
||||
void ProcessUI() {
|
||||
uint8_t Buttons = getButtons(); //read the buttons status
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
|
||||
#include "PID.h"
|
||||
#define MAXPIDOUTPUT 50000
|
||||
|
||||
pidSettingsType pidSettings;
|
||||
|
||||
//This function computes the new value for the ON time of the system
|
||||
//This is the return value from this function
|
||||
int32_t computePID(uint16_t setpoint) {
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
#include "Settings.h"
|
||||
#define FLASH_ADDR (0x8000000|0xBC00)/*Flash start OR'ed with the maximum amount of flash - 1024 bytes*/
|
||||
#define FLASH_LOGOADDR (0x8000000|0xB800) /*second last page of flash set aside for logo image*/
|
||||
|
||||
systemSettingsType systemSettings;
|
||||
|
||||
void saveSettings() {
|
||||
//First we erase the flash
|
||||
FLASH_Unlock(); //unlock flash writing
|
||||
|
||||
Reference in New Issue
Block a user