Started working on next milestone
- Removed the 6V5 power enable - Tweaked the cursor position for preset configuration - Updated the MenuText header file for translation at Photonis git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@320 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.autotools.core.LibtoolGCCBuildCommandParser"/>
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-597876840151086150" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1711300285201" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
@@ -18,7 +18,7 @@
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.autotools.core.LibtoolGCCBuildCommandParser"/>
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-597876840151086150" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1711300285201" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
||||
@@ -39,7 +39,6 @@ MemoryDevice.o \
|
||||
nhd0420.o \
|
||||
Observable.o \
|
||||
PID.o \
|
||||
Power6V5Supply.o \
|
||||
storm700.o \
|
||||
TeslaGunSafety.o
|
||||
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file Power6V5Supply.h
|
||||
/// @brief File description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision$
|
||||
/// $Author$
|
||||
/// $Date$
|
||||
// (c) 2015 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @defgroup {group_name} {group_description}
|
||||
/// Description
|
||||
|
||||
/// @file Power6V5Supply.h
|
||||
/// @ingroup {group_name}
|
||||
|
||||
#ifndef INC_POWER6V5SUPPLY_H_
|
||||
#define INC_POWER6V5SUPPLY_H_
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "stm32f10x.h"
|
||||
|
||||
#include "platform.h"
|
||||
#include "gpio.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/** ----------------------------------------------------------------------------
|
||||
* Power6V5Supply_construct
|
||||
* Constructor for a 6V5 power supply
|
||||
*
|
||||
* @param self
|
||||
* @param solenoidGpio
|
||||
|
||||
* @return ErrorStatus
|
||||
*
|
||||
* @todo
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
extern ErrorStatus Power6V5Supply_construct(struct Gpio* gpio);
|
||||
|
||||
|
||||
/** ----------------------------------------------------------------------------
|
||||
* Power6V5Supply_destruct
|
||||
* Destructor for a 6V5 power supply
|
||||
*
|
||||
* @return ErrorStatus
|
||||
*
|
||||
* @todo
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
extern void Power6V5Supply_destruct(void);
|
||||
|
||||
|
||||
/** ----------------------------------------------------------------------------
|
||||
* Power6V5Supply_unlock
|
||||
* Disables the 6V5 power supply
|
||||
*
|
||||
* @return ErrorStatus
|
||||
*
|
||||
* @todo
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
extern ErrorStatus Power6V5Supply_off(void);
|
||||
|
||||
|
||||
/** ----------------------------------------------------------------------------
|
||||
* Power6V5Supply_on
|
||||
* Enables the 6V5 power supply
|
||||
*
|
||||
* @return ErrorStatus
|
||||
*
|
||||
* @todo
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
extern ErrorStatus Power6V5Supply_on(void);
|
||||
|
||||
|
||||
/** ----------------------------------------------------------------------------
|
||||
* Power6V5Supply_getGPIO
|
||||
* Description of function
|
||||
*
|
||||
* @param
|
||||
* @param
|
||||
* @return struct Gpio*
|
||||
*
|
||||
* @todo
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
extern struct Gpio* Power6V5Supply_getGPIO(void);
|
||||
|
||||
#endif /* INC_POWER6V5SUPPLY_H_ */
|
||||
@@ -1,120 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file Power6V5Supply.c
|
||||
/// @brief Description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision$
|
||||
/// $Author$
|
||||
/// $Date$
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @file Power6V5Supply.c
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#include "Power6V5Supply.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
struct Power6V5Supply
|
||||
{
|
||||
bool initialized;
|
||||
struct Gpio* gpio;
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// File-scope variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
static struct Power6V5Supply self = {.initialized = false};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
ErrorStatus Power6V5Supply_construct(struct Gpio* gpio)
|
||||
{
|
||||
ErrorStatus returnValue = SUCCESS;
|
||||
if (!self.initialized)
|
||||
{
|
||||
self.gpio = gpio;
|
||||
self.initialized = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
returnValue = ERROR;
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
|
||||
void Power6V5Supply_destruct(void)
|
||||
{
|
||||
if (self.initialized)
|
||||
{
|
||||
self.initialized = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ErrorStatus Power6V5Supply_off(void)
|
||||
{
|
||||
ErrorStatus returnValue = SUCCESS;
|
||||
if (self.initialized)
|
||||
{
|
||||
returnValue = GPIO_setValue(self.gpio, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
returnValue = ERROR;
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
|
||||
ErrorStatus Power6V5Supply_on(void)
|
||||
{
|
||||
ErrorStatus returnValue = SUCCESS;
|
||||
if (self.initialized)
|
||||
{
|
||||
returnValue = GPIO_setValue(self.gpio, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
returnValue = ERROR;
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
|
||||
struct Gpio* Power6V5Supply_getGPIO(void)
|
||||
{
|
||||
return self.gpio;
|
||||
}
|
||||
@@ -31,8 +31,10 @@
|
||||
#include "stm32f10x_adc.h"
|
||||
#include "stm32f10x_bkp.h"
|
||||
#include "stm32f10x_dma.h"
|
||||
#include "stm32f10x_exti.h"
|
||||
#include "stm32f10x_gpio.h"
|
||||
#include "stm32f10x_pwr.h"
|
||||
#include "stm32f10x_rcc.h"
|
||||
#include "stm32f10x_it.h"
|
||||
|
||||
#include "Logger.h"
|
||||
@@ -48,7 +50,6 @@
|
||||
#include "MAX5715.h"
|
||||
#include "nhd0420.h"
|
||||
#include "PCBA.h"
|
||||
#include "Power6V5Supply.h"
|
||||
#include "rtc.h"
|
||||
#include "spi.h"
|
||||
#include "spiDevice.h"
|
||||
@@ -78,9 +79,9 @@
|
||||
// SPI1 settings
|
||||
|
||||
// SPI3 settings (LCD / EEPROM)
|
||||
#define SPI_LCD_EEPROM_Direction (SPI_Direction_2Lines_FullDuplex)
|
||||
#define SPI_LCD_EEPROM_RX_QUEUE (32)
|
||||
#define SPI_LCD_EEPROM_TX_QUEUE (32)
|
||||
#define SPI_LCD_Direction (SPI_Direction_2Lines_FullDuplex)
|
||||
#define SPI_LCD_RX_QUEUE (32)
|
||||
#define SPI_LCD_TX_QUEUE (32)
|
||||
|
||||
// Keypad Settings
|
||||
#define KEYPAD_DEBOUNCE_TIME_MS (20)
|
||||
@@ -124,9 +125,7 @@ static struct SpiDevice _spiDAC = {.initialized = false};
|
||||
static struct SpiParameters _spi1DACParameters;
|
||||
static struct Spi _spi3 = {.initialized = false};
|
||||
static struct SpiParameters _spi3DisplayParameters;
|
||||
static struct SpiParameters _spi3EEPROMParameters;
|
||||
static struct SpiDevice _spiDisplay = {.initialized = false};
|
||||
static struct SpiDevice _spiEEPROM = {.initialized = false};
|
||||
|
||||
// Keypad
|
||||
static struct Keypad _keypad = {.initialized = false};
|
||||
@@ -138,7 +137,6 @@ static struct InternalFlash _iFlash = {.initialized = false};
|
||||
// GPIOs
|
||||
static struct Gpio _ledGreen = {.initialized = false};
|
||||
static struct Gpio _ledOrange = {.initialized = false};
|
||||
static struct Gpio _power6v5Enable = {.initialized = false};
|
||||
static struct Gpio _interlockNO = {.initialized = false};
|
||||
static EXTI_InitTypeDef _interlockNOEXTI;
|
||||
static struct Gpio _interlockNC = {.initialized = false};
|
||||
@@ -180,8 +178,6 @@ struct SpiDevice* const spiDAC = &_spiDAC;
|
||||
struct SpiParameters* const spiDACParam = &_spi1DACParameters;
|
||||
struct SpiDevice* const spiDisplay = &_spiDisplay;
|
||||
struct SpiParameters* const spiDisplayParam = &_spi3DisplayParameters;
|
||||
struct SpiDevice* const spiEEPROM = &_spiEEPROM;
|
||||
struct SpiParameters* const spiEEPROMParam = &_spi3EEPROMParameters;
|
||||
|
||||
struct Keypad* const keypad = &_keypad;
|
||||
struct Storm700* const storm700 = &_storm700;
|
||||
@@ -369,134 +365,53 @@ static ErrorStatus initIO (void)
|
||||
|
||||
/* SPI initialisation ----------------------------------------------------*/
|
||||
// SPI1 CLK
|
||||
_spi1.SPI_CLK.GPIO_Typedef = GPIOA;
|
||||
_spi1.SPI_CLK.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF_PP;
|
||||
_spi1.SPI_CLK.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_5;
|
||||
_spi1.SPI_CLK.GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(_spi1.SPI_CLK.GPIO_Typedef, &_spi1.SPI_CLK.GPIO_InitStruct);
|
||||
spi1->SPI_CLK = configureGPIO(GPIOA, GPIO_Mode_AF_PP, GPIO_Speed_50MHz, GPIO_Pin_5);
|
||||
// SPI1 MISO
|
||||
_spi1.SPI_MISO.GPIO_Typedef = GPIOA;
|
||||
_spi1.SPI_MISO.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IN_FLOATING;
|
||||
_spi1.SPI_MISO.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_6;
|
||||
GPIO_Init(_spi1.SPI_MISO.GPIO_Typedef, &_spi1.SPI_MISO.GPIO_InitStruct);
|
||||
spi1->SPI_MISO = configureGPIO(GPIOA, GPIO_Mode_IN_FLOATING, GPIO_Speed_50MHz, GPIO_Pin_6);
|
||||
// SPI1 MOSI
|
||||
_spi1.SPI_MOSI.GPIO_Typedef = GPIOA;
|
||||
_spi1.SPI_MOSI.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF_PP;
|
||||
_spi1.SPI_MOSI.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_7;
|
||||
_spi1.SPI_MOSI.GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(_spi1.SPI_MOSI.GPIO_Typedef, &_spi1.SPI_MOSI.GPIO_InitStruct);
|
||||
// SPI1 CE
|
||||
_spiDAC.SPI_CE.GPIO_Typedef = GPIOA;
|
||||
_spiDAC.SPI_CE.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_Out_PP;
|
||||
_spiDAC.SPI_CE.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_4;
|
||||
_spiDAC.SPI_CE.GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(_spiDAC.SPI_CE.GPIO_Typedef, &_spiDAC.SPI_CE.GPIO_InitStruct);
|
||||
spi1->SPI_MOSI = configureGPIO(GPIOA, GPIO_Mode_AF_PP, GPIO_Speed_50MHz, GPIO_Pin_7);
|
||||
|
||||
spiDAC->spi = &_spi1;
|
||||
// Assign spi1 to purpose
|
||||
spiDAC->spi = spi1;
|
||||
// SPIDAC specific CE
|
||||
spiDAC->SPI_CE = configureGPIO(GPIOA, GPIO_Mode_Out_PP, GPIO_Speed_50MHz, GPIO_Pin_4);
|
||||
|
||||
// SPI3 CLK
|
||||
_spi3.SPI_CLK.GPIO_Typedef = GPIOC;
|
||||
_spi3.SPI_CLK.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF_PP;
|
||||
_spi3.SPI_CLK.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_10;
|
||||
_spi3.SPI_CLK.GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(_spi3.SPI_CLK.GPIO_Typedef, &_spi3.SPI_CLK.GPIO_InitStruct);
|
||||
spi3->SPI_CLK = configureGPIO(GPIOC, GPIO_Mode_AF_PP, GPIO_Speed_50MHz, GPIO_Pin_10);
|
||||
// SPI3 MISO
|
||||
_spi3.SPI_MISO.GPIO_Typedef = GPIOC;
|
||||
_spi3.SPI_MISO.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF_PP;
|
||||
_spi3.SPI_MISO.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_11;
|
||||
_spi3.SPI_MISO.GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(_spi3.SPI_MISO.GPIO_Typedef, &_spi3.SPI_MISO.GPIO_InitStruct);
|
||||
spi3->SPI_MISO = configureGPIO(GPIOC, GPIO_Mode_IN_FLOATING, GPIO_Speed_50MHz, GPIO_Pin_11);
|
||||
// SPI3 MOSI
|
||||
_spi3.SPI_MOSI.GPIO_Typedef = GPIOC;
|
||||
_spi3.SPI_MOSI.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF_PP;
|
||||
_spi3.SPI_MOSI.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_12;
|
||||
_spi3.SPI_MOSI.GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(_spi3.SPI_MOSI.GPIO_Typedef, &_spi3.SPI_MOSI.GPIO_InitStruct);
|
||||
spi3->SPI_MOSI = configureGPIO(GPIOC, GPIO_Mode_AF_PP, GPIO_Speed_50MHz, GPIO_Pin_12);
|
||||
|
||||
// Apply pin-remapping for SPI3 I/Os (alternative I/Os usage)
|
||||
GPIO_PinRemapConfig(GPIO_Remap_SPI3, ENABLE);
|
||||
|
||||
// SPI3 Display shares all parameters with SPI3 but the ChipEnable, which is different
|
||||
_spiDisplay.spi = &_spi3;
|
||||
// SPI3 CE EEPROM
|
||||
_spiDisplay.SPI_CE.GPIO_Typedef = GPIOE;
|
||||
_spiDisplay.SPI_CE.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_Out_PP;
|
||||
_spiDisplay.SPI_CE.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_0;
|
||||
_spiDisplay.SPI_CE.GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(_spiDisplay.SPI_CE.GPIO_Typedef, &_spiDisplay.SPI_CE.GPIO_InitStruct);
|
||||
|
||||
// SPI3 EEPROM shares all parameters with SPI3 but the ChipEnable, which is different
|
||||
_spiEEPROM.spi = &_spi3;
|
||||
// SPI3 CE EEPROM
|
||||
_spiEEPROM.SPI_CE.GPIO_Typedef = GPIOE;
|
||||
_spiEEPROM.SPI_CE.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_Out_PP;
|
||||
_spiEEPROM.SPI_CE.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_2;
|
||||
_spiEEPROM.SPI_CE.GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(_spiEEPROM.SPI_CE.GPIO_Typedef, &_spiEEPROM.SPI_CE.GPIO_InitStruct);
|
||||
spiDisplay->spi = spi3;
|
||||
// SPI Display specific CE
|
||||
spiDisplay->SPI_CE = configureGPIO(GPIOE, GPIO_Mode_Out_PP, GPIO_Speed_50MHz, GPIO_Pin_0);
|
||||
|
||||
|
||||
/* KEYPAD initialisation -------------------------------------------------*/
|
||||
// Row1
|
||||
keypad->row[0].gpio.GPIO_Typedef = GPIOD;
|
||||
keypad->row[0].gpio.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_Out_PP;
|
||||
keypad->row[0].gpio.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_0;
|
||||
keypad->row[0].gpio.GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(keypad->row[0].gpio.GPIO_Typedef, &keypad->row[0].gpio.GPIO_InitStruct);
|
||||
|
||||
keypad->row[0].gpio = configureGPIO(GPIOD, GPIO_Mode_Out_PP, GPIO_Speed_50MHz, GPIO_Pin_0);
|
||||
// Row2
|
||||
keypad->row[1].gpio.GPIO_Typedef = GPIOD;
|
||||
keypad->row[1].gpio.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_Out_PP;
|
||||
keypad->row[1].gpio.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_1;
|
||||
keypad->row[1].gpio.GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(keypad->row[1].gpio.GPIO_Typedef, &keypad->row[1].gpio.GPIO_InitStruct);
|
||||
keypad->row[1].gpio = configureGPIO(GPIOD, GPIO_Mode_Out_PP, GPIO_Speed_50MHz, GPIO_Pin_1);
|
||||
// Row3
|
||||
keypad->row[2].gpio.GPIO_Typedef = GPIOD;
|
||||
keypad->row[2].gpio.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_Out_PP;
|
||||
keypad->row[2].gpio.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_2;
|
||||
keypad->row[2].gpio.GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(keypad->row[2].gpio.GPIO_Typedef, &keypad->row[2].gpio.GPIO_InitStruct);
|
||||
keypad->row[2].gpio = configureGPIO(GPIOD, GPIO_Mode_Out_PP, GPIO_Speed_50MHz, GPIO_Pin_2);
|
||||
// Row4
|
||||
keypad->row[3].gpio.GPIO_Typedef = GPIOD;
|
||||
keypad->row[3].gpio.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_Out_PP;
|
||||
keypad->row[3].gpio.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_3;
|
||||
keypad->row[3].gpio.GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(keypad->row[3].gpio.GPIO_Typedef, &keypad->row[3].gpio.GPIO_InitStruct);
|
||||
keypad->row[3].gpio = configureGPIO(GPIOD, GPIO_Mode_Out_PP, GPIO_Speed_50MHz, GPIO_Pin_3);
|
||||
|
||||
// Column1
|
||||
keypad->column[0].gpio.GPIO_Typedef = GPIOD;
|
||||
keypad->column[0].gpio.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IPU;
|
||||
keypad->column[0].gpio.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_4;
|
||||
keypad->column[0].gpio.GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(keypad->column[0].gpio.GPIO_Typedef, &keypad->column[0].gpio.GPIO_InitStruct);
|
||||
GPIO_EXTILineConfig(GPIO_PortSourceGPIOD, GPIO_PinSource4);
|
||||
|
||||
keypad->column[0].gpio = configureGPIO(GPIOD, GPIO_Mode_Out_PP, GPIO_Speed_50MHz, GPIO_Pin_4);
|
||||
// Column2
|
||||
keypad->column[1].gpio.GPIO_Typedef = GPIOD;
|
||||
keypad->column[1].gpio.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IPU;
|
||||
keypad->column[1].gpio.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_5;
|
||||
keypad->column[1].gpio.GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(keypad->column[1].gpio.GPIO_Typedef, &keypad->column[1].gpio.GPIO_InitStruct);
|
||||
GPIO_EXTILineConfig(GPIO_PortSourceGPIOD, GPIO_PinSource5);
|
||||
|
||||
keypad->column[1].gpio = configureGPIO(GPIOD, GPIO_Mode_Out_PP, GPIO_Speed_50MHz, GPIO_Pin_5);
|
||||
// Column3
|
||||
keypad->column[2].gpio.GPIO_Typedef = GPIOD;
|
||||
keypad->column[2].gpio.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IPU;
|
||||
keypad->column[2].gpio.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_6;
|
||||
keypad->column[2].gpio.GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(keypad->column[2].gpio.GPIO_Typedef, &keypad->column[2].gpio.GPIO_InitStruct);
|
||||
GPIO_EXTILineConfig(GPIO_PortSourceGPIOD, GPIO_PinSource6);
|
||||
|
||||
keypad->column[2].gpio = configureGPIO(GPIOD, GPIO_Mode_Out_PP, GPIO_Speed_50MHz, GPIO_Pin_6);
|
||||
// Column4
|
||||
keypad->column[3].gpio.GPIO_Typedef = GPIOD;
|
||||
keypad->column[3].gpio.GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IPU;
|
||||
keypad->column[3].gpio.GPIO_InitStruct.GPIO_Pin = GPIO_Pin_7;
|
||||
keypad->column[3].gpio.GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(keypad->column[3].gpio.GPIO_Typedef, &keypad->column[3].gpio.GPIO_InitStruct);
|
||||
GPIO_EXTILineConfig(GPIO_PortSourceGPIOD, GPIO_PinSource7);
|
||||
keypad->column[3].gpio = configureGPIO(GPIOD, GPIO_Mode_Out_PP, GPIO_Speed_50MHz, GPIO_Pin_7);
|
||||
|
||||
/* GPIO initialisation ---------------------------------------------------*/
|
||||
// 6V5 enable -> PE12 output
|
||||
_power6v5Enable.gpio = configureGPIO(GPIOE, GPIO_Mode_Out_PP, GPIO_Speed_50MHz, GPIO_Pin_12);
|
||||
// Interlock1 - PB0 input
|
||||
_interlockNO.gpio = configureGPIO(GPIOB, GPIO_Mode_IPU, GPIO_Speed_50MHz, GPIO_Pin_0);
|
||||
GPIO_EXTILineConfig(GPIO_PortSourceGPIOB, GPIO_PinSource0);
|
||||
@@ -525,7 +440,7 @@ static ErrorStatus initIO (void)
|
||||
|
||||
if (PCBA_getInstance()->pcba == PCBA_Tesla)
|
||||
{
|
||||
// Tesla Gun relay PB9 (or 10???)
|
||||
// Tesla Gun relay PB9
|
||||
_teslaRelay.gpio = configureGPIO(GPIOB, GPIO_Mode_Out_PP, GPIO_Speed_50MHz, GPIO_Pin_9);
|
||||
}
|
||||
return returnValue;
|
||||
@@ -657,13 +572,12 @@ static ErrorStatus initPeriphery(void)
|
||||
// Use full-duples instead of TX only, because the EEPROM is both write- and readable
|
||||
spiDisplayParam->SPI_Direction = SPI_Direction_2Lines_FullDuplex;
|
||||
// Adjust the RX and TX queues for multiple use
|
||||
spiDisplayParam->rxQueueSize = SPI_LCD_EEPROM_RX_QUEUE;
|
||||
spiDisplayParam->txQueueSize = SPI_LCD_EEPROM_TX_QUEUE;
|
||||
spiDisplayParam->rxQueueSize = SPI_LCD_RX_QUEUE;
|
||||
spiDisplayParam->txQueueSize = SPI_LCD_TX_QUEUE;
|
||||
///TODO SPI_CE should be initialized individually
|
||||
GPIO_SetBits(spiDisplay->SPI_CE.GPIO_Typedef, spiDisplay->SPI_CE.GPIO_InitStruct.GPIO_Pin);
|
||||
GPIO_SetBits(spiEEPROM->SPI_CE.GPIO_Typedef, spiEEPROM->SPI_CE.GPIO_InitStruct.GPIO_Pin);
|
||||
SpiDevice_construct(spiDisplay, spi3, spiDisplayParam);
|
||||
SpiDevice_construct(spiEEPROM, spi3, spiEEPROMParam);
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------*/
|
||||
/* KEYPAD COLUMNS */
|
||||
@@ -703,7 +617,6 @@ static ErrorStatus initPeriphery(void)
|
||||
InternalFlash_construct(iFlash);
|
||||
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------*/
|
||||
/* GPIOs */
|
||||
/* --------------------------------------------------------------------*/
|
||||
@@ -711,8 +624,6 @@ static ErrorStatus initPeriphery(void)
|
||||
GPIO_construct(ledGreen, OUTPUT, ledGreen->gpio);
|
||||
// Orange LED
|
||||
GPIO_construct(ledOrange, OUTPUT, ledOrange->gpio);
|
||||
// 6V5 Power Enable
|
||||
GPIO_construct(&_power6v5Enable, OUTPUT, _power6v5Enable.gpio);
|
||||
|
||||
IRQ_setInterruptProperties(EXTI0_IRQn, 12, 0, ENABLE);
|
||||
IRQ_setInterruptProperties(EXTI1_IRQn, 12, 0, ENABLE);
|
||||
@@ -765,11 +676,6 @@ static ErrorStatus initPlatformDevices (void)
|
||||
Interlock_construct(interlock, COMMON_INTERLOCK, &_interlockNO, _interlockNOEXTI, &_interlockNC, _interlockNCEXTI, INTERLOCK_DEBOUNCE_TIME_MS);
|
||||
}
|
||||
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
Power6V5Supply_construct(&_power6v5Enable);
|
||||
}
|
||||
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
CoverSolenoid_construct(&_solenoid);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="510461499985258339" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-43896984865580189" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
@@ -16,7 +16,7 @@
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="510461499985258339" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-43896984865580189" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
- Display cursor unstable
|
||||
- repairMenu has bad reference to getmainrepairmenu
|
||||
- Makefile extention to have output file name corresponding to langugage and build targets
|
||||
- Display misses first character (row1/column1) when starting. Should be a delay problem in creating the start screen. (between putting cursor home and write action)
|
||||
|
||||
|
||||
|
||||
FIXED
|
||||
0.9.0.4
|
||||
- PIN change verification not functional
|
||||
- Multi-Language support added to menu. All strings/messages outsourced to dedicated file. MakeFile adapted
|
||||
- NumberOfStages Macro for presets not implemented well. It will be ignored when generating DEFAULT presets
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="510461499985258339" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-43896984865580189" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
@@ -18,7 +18,7 @@
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="510461499985258339" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-43896984865580189" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
// -----------------------
|
||||
static const char MenuText_WARNING[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_ROW1_POPUP_MAX_LENGTH] =
|
||||
{
|
||||
// MAX 17 CHARACTERS
|
||||
{
|
||||
"!!WARNING!!"
|
||||
},
|
||||
@@ -66,6 +67,7 @@ static const char MenuText_WARNING[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_ROW1_P
|
||||
|
||||
static const char MenuText_WARNING_COVER_OPEN[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_POPUP_MESSAGE_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"COVER OPEN"
|
||||
},
|
||||
@@ -80,6 +82,7 @@ static const char MenuText_WARNING_COVER_OPEN[MENUTEXT_NUMBER_OF_LANGUAGES][MENU
|
||||
// -----------------------
|
||||
static const char MenuText_ERROR[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_ROW1_POPUP_MAX_LENGTH] =
|
||||
{
|
||||
// MAX 17 CHARACTERS
|
||||
{
|
||||
"!!ERROR!!"
|
||||
},
|
||||
@@ -90,6 +93,7 @@ static const char MenuText_ERROR[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_ROW1_POP
|
||||
|
||||
static const char MenuText_ERROR_COVER_OPEN[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_POPUP_MESSAGE_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"COVER OPEN"
|
||||
},
|
||||
@@ -101,6 +105,7 @@ static const char MenuText_ERROR_COVER_OPEN[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTE
|
||||
|
||||
static const char MenuText_ERROR_PROCESS_FAILED[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_POPUP_MESSAGE_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"PROCESS FAILED"
|
||||
},
|
||||
@@ -111,6 +116,7 @@ static const char MenuText_ERROR_PROCESS_FAILED[MENUTEXT_NUMBER_OF_LANGUAGES][ME
|
||||
|
||||
static const char MenuText_ERROR_CRC_PIN[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_POPUP_MESSAGE_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"PIN CRC ERROR"
|
||||
},
|
||||
@@ -121,6 +127,7 @@ static const char MenuText_ERROR_CRC_PIN[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_
|
||||
|
||||
static const char MenuText_ERROR_CRC_PARAMETERS[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_POPUP_MESSAGE_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"PARAMETERS CRC ERROR"
|
||||
},
|
||||
@@ -131,6 +138,7 @@ static const char MenuText_ERROR_CRC_PARAMETERS[MENUTEXT_NUMBER_OF_LANGUAGES][ME
|
||||
|
||||
static const char MenuText_ERROR_CRC_PRESETS[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_POPUP_MESSAGE_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"PRESETS CRC ERROR"
|
||||
},
|
||||
@@ -145,6 +153,7 @@ static const char MenuText_ERROR_CRC_PRESETS[MENUTEXT_NUMBER_OF_LANGUAGES][MENUT
|
||||
|
||||
static const char MenuText_X_CONTINUE[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_POPUP_MESSAGE_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"Hit X to continue"
|
||||
},
|
||||
@@ -155,6 +164,7 @@ static const char MenuText_X_CONTINUE[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_POP
|
||||
|
||||
static const char MenuText_REPAIR_SCREEN[MENUTEXT_NUMBER_OF_LANGUAGES][4][MENUTEXT_REPAIRSCREEN_LENGTH] =
|
||||
{
|
||||
// MAX 7 CHARACTERS
|
||||
{
|
||||
"total", // Indicates the total repair time
|
||||
"remain", // Indicates the remaining repair time
|
||||
@@ -168,6 +178,7 @@ static const char MenuText_REPAIR_SCREEN[MENUTEXT_NUMBER_OF_LANGUAGES][4][MENUTE
|
||||
|
||||
static const char MenuText_REPAIR_SCREEN_INIT[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_ROW1_POPUP_MAX_LENGTH] =
|
||||
{
|
||||
// MAX 17 CHARACTERS
|
||||
{
|
||||
"Initialising" // Indicates start of a repair
|
||||
},
|
||||
@@ -178,6 +189,7 @@ static const char MenuText_REPAIR_SCREEN_INIT[MENUTEXT_NUMBER_OF_LANGUAGES][MENU
|
||||
|
||||
static const char MenuText_PAUSE[MENUTEXT_NUMBER_OF_LANGUAGES][5][MENUTEXT_POPUP_MESSAGE_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"REPAIR BUSY",
|
||||
"Hit X to PAUSE",
|
||||
@@ -192,6 +204,7 @@ static const char MenuText_PAUSE[MENUTEXT_NUMBER_OF_LANGUAGES][5][MENUTEXT_POPUP
|
||||
|
||||
static const char MenuText_FINISH[MENUTEXT_NUMBER_OF_LANGUAGES][2][MENUTEXT_POPUP_MESSAGE_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"REPAIR FINISHED",
|
||||
"Hit ENT to continue",
|
||||
@@ -203,6 +216,7 @@ static const char MenuText_FINISH[MENUTEXT_NUMBER_OF_LANGUAGES][2][MENUTEXT_POPU
|
||||
|
||||
static const char MenuText_PRINT_PRESET[MENUTEXT_NUMBER_OF_LANGUAGES][5][MENUTEXT_PRESET_MAX_LENGTH] =
|
||||
{
|
||||
// MAX 7 CHARACTERS - MIND THE COLON, IT MUST BE CALCULATED INTO THE MAX CHARACTERS
|
||||
{
|
||||
"Preset",
|
||||
"info",
|
||||
@@ -217,6 +231,7 @@ static const char MenuText_PRINT_PRESET[MENUTEXT_NUMBER_OF_LANGUAGES][5][MENUTEX
|
||||
|
||||
static const char MenuText_CHANGE_PIN[MENUTEXT_NUMBER_OF_LANGUAGES][2][MENUTEXT_CHANGEPIN_MAX_LENGTH] =
|
||||
{
|
||||
// MAX 15 CHARACTERS
|
||||
{
|
||||
" New PIN:",
|
||||
" Repeat PIN:"
|
||||
@@ -228,6 +243,7 @@ static const char MenuText_CHANGE_PIN[MENUTEXT_NUMBER_OF_LANGUAGES][2][MENUTEXT_
|
||||
|
||||
static const char MenuText_INTERLOCK_STATUS[MENUTEXT_NUMBER_OF_LANGUAGES][3][MENUTEXT_POPUP_MESSAGE_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"Cover Interlock is",
|
||||
"closed",
|
||||
@@ -240,6 +256,7 @@ static const char MenuText_INTERLOCK_STATUS[MENUTEXT_NUMBER_OF_LANGUAGES][3][MEN
|
||||
|
||||
static const char MenuText_CONFIRM_PIN[MENUTEXT_NUMBER_OF_LANGUAGES][2][MENUTEXT_POPUP_MESSAGE_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"PIN OK",
|
||||
"PIN DENIED"
|
||||
@@ -251,6 +268,7 @@ static const char MenuText_CONFIRM_PIN[MENUTEXT_NUMBER_OF_LANGUAGES][2][MENUTEXT
|
||||
|
||||
static const char MenuText_CONFIRM_NEW_PIN[MENUTEXT_NUMBER_OF_LANGUAGES][2][MENUTEXT_POPUP_MESSAGE_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"New PIN accepted",
|
||||
"New PIN denied"
|
||||
@@ -262,6 +280,7 @@ static const char MenuText_CONFIRM_NEW_PIN[MENUTEXT_NUMBER_OF_LANGUAGES][2][MENU
|
||||
|
||||
static const char MenuText_SAFE_PRESET[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_POPUP_MESSAGE_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"Preset saved"
|
||||
},
|
||||
@@ -272,6 +291,7 @@ static const char MenuText_SAFE_PRESET[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_PO
|
||||
|
||||
static const char MenuText_SELECT_PRESET[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_POPUP_MESSAGE_LENGTH - 3] =
|
||||
{
|
||||
// MAX 17 CHARACTERS
|
||||
{
|
||||
"Selected preset:"
|
||||
},
|
||||
@@ -283,6 +303,7 @@ static const char MenuText_SELECT_PRESET[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_
|
||||
|
||||
static const char MenuText_SAFE_CONSTANTS[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_POPUP_MESSAGE_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"Constants saved"
|
||||
},
|
||||
@@ -293,6 +314,7 @@ static const char MenuText_SAFE_CONSTANTS[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT
|
||||
|
||||
static const char MenuText_INSERT_PIN[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_POPUP_MESSAGE_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"Insert PIN"
|
||||
},
|
||||
@@ -303,6 +325,7 @@ static const char MenuText_INSERT_PIN[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_POP
|
||||
|
||||
static const char MenuText_VOLTAGE_IN_HEADER[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_ROW1_POPUP_MAX_LENGTH] =
|
||||
{
|
||||
// MAX 16 CHARACTERS
|
||||
{
|
||||
"Get voltage in"
|
||||
},
|
||||
@@ -313,6 +336,7 @@ static const char MenuText_VOLTAGE_IN_HEADER[MENUTEXT_NUMBER_OF_LANGUAGES][MENUT
|
||||
|
||||
static const char MenuText_VOLTAGE_OUT_HEADER[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_ROW1_POPUP_MAX_LENGTH] =
|
||||
{
|
||||
// MAX 16 CHARACTERS
|
||||
{
|
||||
"Set voltage out"
|
||||
},
|
||||
@@ -323,6 +347,7 @@ static const char MenuText_VOLTAGE_OUT_HEADER[MENUTEXT_NUMBER_OF_LANGUAGES][MENU
|
||||
|
||||
static const char MenuText_VOLTAGE_ROW[MENUTEXT_NUMBER_OF_LANGUAGES][5] =
|
||||
{
|
||||
// MAX 5 CHARACTERS
|
||||
{
|
||||
"Row"
|
||||
},
|
||||
@@ -333,6 +358,7 @@ static const char MenuText_VOLTAGE_ROW[MENUTEXT_NUMBER_OF_LANGUAGES][5] =
|
||||
|
||||
static const char MenuText_CONSTANTS_HEADER[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTEXT_ROW1_POPUP_MAX_LENGTH] =
|
||||
{
|
||||
// MAX 16 CHARACTERS
|
||||
{
|
||||
"PID constants"
|
||||
},
|
||||
@@ -343,6 +369,7 @@ static const char MenuText_CONSTANTS_HEADER[MENUTEXT_NUMBER_OF_LANGUAGES][MENUTE
|
||||
|
||||
static const char MenuText_VOLTAGE_OUT_CLEANUP[MENUTEXT_NUMBER_OF_LANGUAGES][2][MENUTEXT_POPUP_MESSAGE_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"All rows reset to 0V",
|
||||
"Press X to continue"
|
||||
@@ -357,6 +384,7 @@ static const char MenuText_VOLTAGE_OUT_CLEANUP[MENUTEXT_NUMBER_OF_LANGUAGES][2][
|
||||
// -----------------------
|
||||
static const char MenuText_MAINMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_NUMBER_OF_ROWS][MENUCORE_DISPLAY_ROW_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS - MIND THE TWO BLANKS AT STRING START - THIS IS WHERE THE CURSOR IS PUT
|
||||
{
|
||||
"",
|
||||
" 1.Tube repair",
|
||||
@@ -370,6 +398,7 @@ static const char MenuText_MAINMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_N
|
||||
|
||||
static const char MenuText_CATHODEMCP_SELECT[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_NUMBER_OF_ROWS][MENUCORE_DISPLAY_ROW_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS - MIND THE TWO BLANKS AT STRING START - THIS IS WHERE THE CURSOR IS PUT
|
||||
{
|
||||
"Tube repair",
|
||||
" 1.Cathode repair",
|
||||
@@ -382,6 +411,7 @@ static const char MenuText_CATHODEMCP_SELECT[MENUTEXT_NUMBER_OF_LANGUAGES][MENUC
|
||||
|
||||
static const char MenuText_ADMIN_CATHODEMCP_SELECT[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_NUMBER_OF_ROWS][MENUCORE_DISPLAY_ROW_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS - MIND THE TWO BLANKS AT STRING START - THIS IS WHERE THE CURSOR IS PUT
|
||||
{
|
||||
"Administration",
|
||||
" 1.Cathode",
|
||||
@@ -395,6 +425,7 @@ static const char MenuText_ADMIN_CATHODEMCP_SELECT[MENUTEXT_NUMBER_OF_LANGUAGES]
|
||||
|
||||
static const char MenuText_REPAIRMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_NUMBER_OF_ROWS][MENUCORE_DISPLAY_ROW_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS - MIND THE TWO BLANKS AT STRING START - THIS IS WHERE THE CURSOR IS PUT
|
||||
{
|
||||
"Tube repair",
|
||||
" 1.Select preset",
|
||||
@@ -408,6 +439,7 @@ static const char MenuText_REPAIRMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX
|
||||
|
||||
static const char MenuText_PRESETMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_NUMBER_OF_ROWS][MENUCORE_DISPLAY_ROW_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS - MIND THE TWO BLANKS AT STRING START - THIS IS WHERE THE CURSOR IS PUT
|
||||
{
|
||||
"Select preset",
|
||||
" 1.Preset 1",
|
||||
@@ -433,6 +465,7 @@ static const char MenuText_PRESETMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX
|
||||
// Administration main screen
|
||||
static const char MenuText_ADMINMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_NUMBER_OF_ROWS][MENUCORE_DISPLAY_ROW_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS - MIND THE TWO BLANKS AT STRING START - THIS IS WHERE THE CURSOR IS PUT
|
||||
{
|
||||
"Administration",
|
||||
" 1.Change Pin",
|
||||
@@ -449,6 +482,7 @@ static const char MenuText_ADMINMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_
|
||||
// Administration main screen
|
||||
static const char MenuText_ADMINCHANGEPINMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_NUMBER_OF_ROWS][MENUCORE_DISPLAY_ROW_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"Change PIN",
|
||||
},
|
||||
@@ -460,6 +494,7 @@ static const char MenuText_ADMINCHANGEPINMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENU
|
||||
// Administration I/O Control screen
|
||||
static const char MenuText_ADMINIOMAINMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_NUMBER_OF_ROWS][MENUCORE_DISPLAY_ROW_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS - MIND THE TWO BLANKS AT STRING START - THIS IS WHERE THE CURSOR IS PUT
|
||||
{
|
||||
"I/O control",
|
||||
" 1.Read interlock",
|
||||
@@ -477,6 +512,7 @@ static const char MenuText_ADMINIOMAINMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCOR
|
||||
// Administration I/O Control screen
|
||||
static const char MenuText_ADMINIOINTERLOCKMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_NUMBER_OF_ROWS][MENUCORE_DISPLAY_ROW_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"Read interlock",
|
||||
},
|
||||
@@ -489,6 +525,7 @@ static const char MenuText_ADMINIOINTERLOCKMENU[MENUTEXT_NUMBER_OF_LANGUAGES][ME
|
||||
// Administration solenoids toggle screen
|
||||
static const char MenuText_ADMINSOLENOIDMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_NUMBER_OF_ROWS][MENUCORE_DISPLAY_ROW_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"Solenoids",
|
||||
" Hold 0 to toggle",
|
||||
@@ -504,6 +541,7 @@ static const char MenuText_ADMINSOLENOIDMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUC
|
||||
// Administration Get Voltage output screen
|
||||
static const char MenuText_ADMINVOLTAGOUTMAINMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_NUMBER_OF_ROWS][MENUCORE_DISPLAY_ROW_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS - MIND THE TWO BLANKS AT STRING START - THIS IS WHERE THE CURSOR IS PUT
|
||||
{
|
||||
"Set voltage out",
|
||||
" 1.Channel 1",
|
||||
@@ -520,6 +558,7 @@ static const char MenuText_ADMINVOLTAGOUTMAINMENU[MENUTEXT_NUMBER_OF_LANGUAGES][
|
||||
// Administration solenoids toggle screen
|
||||
static const char MenuText_ADMINTESLAGUNMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_NUMBER_OF_ROWS][MENUCORE_DISPLAY_ROW_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"Teslagun relais",
|
||||
" Hold 0 to toggle",
|
||||
@@ -535,6 +574,7 @@ static const char MenuText_ADMINTESLAGUNMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUC
|
||||
// Administration Preset configuration
|
||||
static const char MenuText_ADMINPRESETCONFIGSELECTMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_NUMBER_OF_ROWS][MENUCORE_DISPLAY_ROW_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS - MIND THE TWO BLANKS AT STRING START - THIS IS WHERE THE CURSOR IS PUT
|
||||
{
|
||||
"Preset config",
|
||||
" 1.Preset 1 config",
|
||||
@@ -556,6 +596,7 @@ static const char MenuText_ADMINPRESETCONFIGSELECTMENU[MENUTEXT_NUMBER_OF_LANGUA
|
||||
// Administration INFO&VERSION
|
||||
static const char MenuText_ADMININFOMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_NUMBER_OF_ROWS][MENUCORE_DISPLAY_ROW_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS
|
||||
{
|
||||
"Info & Version",
|
||||
},
|
||||
@@ -570,6 +611,7 @@ static const char MenuText_ADMININFOMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_
|
||||
// -----------------------
|
||||
static const char MenuText_CALIBRATIONMENU[MENUTEXT_NUMBER_OF_LANGUAGES][MENUCORE_MAX_NUMBER_OF_ROWS][MENUCORE_DISPLAY_ROW_LENGTH] =
|
||||
{
|
||||
// MAX 20 CHARACTERS - MIND THE TWO BLANKS AT STRING START - THIS IS WHERE THE CURSOR IS PUT
|
||||
{
|
||||
"Calibration",
|
||||
" 1.NOTHING YET",
|
||||
|
||||
@@ -167,15 +167,13 @@ static void MenuCore_task(void* parameters)
|
||||
if (MenuCore_performAction(self, key, keyState) == SUCCESS)
|
||||
{
|
||||
// The key had an action
|
||||
// Clear the screen for a new menu
|
||||
// Display_clearScreen(self->display);
|
||||
// Print menu content to output device
|
||||
MenuCore_printMenu(self);
|
||||
// Add cursor if necessary
|
||||
MenuCore_printCursor(self);
|
||||
}
|
||||
}
|
||||
vTaskDelay(50);
|
||||
vTaskDelay(100);
|
||||
}
|
||||
|
||||
LOGGER_INFO(mainLog, "Deleting MenuCore task");
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
#include "Interlock.h"
|
||||
#include "Logger.h"
|
||||
#include "PCBA.h"
|
||||
#include "Power6V5Supply.h"
|
||||
#include "TeslaGunSafety.h"
|
||||
#include "Version.h"
|
||||
|
||||
@@ -140,13 +139,6 @@ ErrorStatus hsb_enableSafetyWithError(void)
|
||||
}
|
||||
}
|
||||
|
||||
// if Interlock(s) closed, continue procedure
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
// Power the circuit
|
||||
returnValue = Power6V5Supply_on();
|
||||
}
|
||||
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
_hsb_safetyIsEnabled = true;
|
||||
@@ -193,13 +185,6 @@ ErrorStatus hsb_enableSafetyWithWarning(void)
|
||||
}
|
||||
}
|
||||
|
||||
// if Interlock(s) closed, continue procedure
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
// Power the circuit
|
||||
returnValue = Power6V5Supply_on();
|
||||
}
|
||||
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
_hsb_safetyIsEnabled = true;
|
||||
@@ -239,8 +224,6 @@ ErrorStatus hsb_disableSafety(void)
|
||||
DAConverter_setOutputVoltage(dacRow2, 0);
|
||||
DAConverter_setOutputVoltage(dacRow3, 0);
|
||||
|
||||
// Un-Power the circuit
|
||||
Power6V5Supply_off();
|
||||
|
||||
if (PCBA_getInstance()->pcba != PCBA_Tesla)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
#include "Interlock.h"
|
||||
#include "Logger.h"
|
||||
#include "nhd0420.h"
|
||||
#include "Power6V5Supply.h"
|
||||
#include "TeslaGunSafety.h"
|
||||
|
||||
#include "PCBA.h"
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
#include "Interlock.h"
|
||||
#include "internalADC.h"
|
||||
#include "MAX5715.h"
|
||||
#include "Power6V5Supply.h"
|
||||
#include "TeslaGunSafety.h"
|
||||
|
||||
#include "KeyboardDevice.h"
|
||||
@@ -576,7 +575,6 @@ static void repairMenu_configPresetFirstSoftstart(struct MenuCore* self)
|
||||
|
||||
static void repairMenu_configVoltageOutput(struct MenuCore* self)
|
||||
{
|
||||
Power6V5Supply_on();
|
||||
repairMenu_clearInsertString(self);
|
||||
// In case of CathodeMCP, the insert value must be negative
|
||||
repairMenu_fillInsertStringWithValue(self, DAConverter_getCurrentValue(dacRow1));
|
||||
@@ -1097,10 +1095,7 @@ void repairMenu_menuStateHandle(struct MenuCore* self)
|
||||
// repair is finished
|
||||
MenuCore_changeState(self, RM_FINISH_CONTROL);
|
||||
}
|
||||
// else if (remainingTime == 0xFFFFFFFF)
|
||||
// {
|
||||
// Error_postError(REPAIR_FAIL);
|
||||
// }
|
||||
|
||||
else
|
||||
{
|
||||
// Create the repair screen
|
||||
@@ -1180,14 +1175,13 @@ void repairMenu_menuStateHandle(struct MenuCore* self)
|
||||
snprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), "%5sm", self->insertString);
|
||||
Display_write(self->display, buffer, 2, MENUTEXT_PRESET_MAX_LENGTH + 1);
|
||||
vTaskDelay(2);
|
||||
Display_setCursorToPosition(self->display, 2, MENUTEXT_PRESET_MAX_LENGTH + 1 + 5);
|
||||
Display_setCursorToPosition(self->display, 2, MENUTEXT_PRESET_MAX_LENGTH + 5);
|
||||
vTaskDelay(2);
|
||||
Display_setBlinkingCursorState(self->display, ON);
|
||||
}
|
||||
|
||||
else if (self->menuState == RM_ADMIN_PRESET_CONFIG_FIRST_DURATION)
|
||||
{
|
||||
// repairMenu_printConfigPreset(self);
|
||||
repairMenu_printPreset(self);
|
||||
char buffer[7];
|
||||
|
||||
@@ -1204,14 +1198,13 @@ void repairMenu_menuStateHandle(struct MenuCore* self)
|
||||
snprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), "%5sm", self->insertString);
|
||||
Display_write(self->display, buffer, 3, MENUTEXT_PRESET_MAX_LENGTH + 1);
|
||||
vTaskDelay(2);
|
||||
Display_setCursorToPosition(self->display, 3, MENUTEXT_PRESET_MAX_LENGTH + 1 + 5);
|
||||
Display_setCursorToPosition(self->display, 3, MENUTEXT_PRESET_MAX_LENGTH + 5);
|
||||
vTaskDelay(2);
|
||||
Display_setBlinkingCursorState(self->display, ON);
|
||||
}
|
||||
|
||||
else if (self->menuState == RM_ADMIN_PRESET_CONFIG_FIRST_VOLTAGE)
|
||||
{
|
||||
// repairMenu_printConfigPreset(self);
|
||||
repairMenu_printPreset(self);
|
||||
char buffer[7];
|
||||
|
||||
@@ -1528,7 +1521,6 @@ void repairMenu_menuStateHandle(struct MenuCore* self)
|
||||
DAConverter_setOutputVoltage(dacRow2, 0);
|
||||
DAConverter_setOutputVoltage(dacRow3, 0);
|
||||
|
||||
Power6V5Supply_off();
|
||||
|
||||
Display_writeCentered(self->display, MenuText_VOLTAGE_OUT_CLEANUP[languageIndex][0], 3);
|
||||
Display_writeCentered(self->display, MenuText_VOLTAGE_OUT_CLEANUP[languageIndex][1], 4);
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "Interlock.h"
|
||||
#include "Logger.h"
|
||||
#include "PCBA.h"
|
||||
#include "Power6V5Supply.h"
|
||||
#include "rtc.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user