mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
Cosmetics
This commit is contained in:
parent
e25db7e9e0
commit
ab6c6babae
8 changed files with 23 additions and 47 deletions
|
@ -468,5 +468,11 @@ if(CPU_FAMILY STREQUAL STM32)
|
|||
DEPENDS firmware
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
add_custom_target(jtag-flash
|
||||
COMMAND st-flash --reset write firmware.bin 0x8000000
|
||||
DEPENDS firmware
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -335,7 +335,7 @@ extern const char * debugTimerNames[DEBUG_TIMERS_COUNT];
|
|||
#endif // #if defined(__cplusplus)
|
||||
|
||||
#define DEBUG_TIMER_START(timer) debugTimers[timer].start()
|
||||
#define DEBUG_TIMER_STOP(timer) debugTimers[timer].stop()
|
||||
#define DEBUG_TIMER_STOP(timer) debugTimers[timer].stop()
|
||||
#define DEBUG_TIMER_SAMPLE(timer) debugTimers[timer].sample()
|
||||
|
||||
|
||||
|
|
|
@ -1497,7 +1497,7 @@ union ReusableBuffer
|
|||
} sdmanager;
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUSTM32)
|
||||
struct
|
||||
{
|
||||
char id[27];
|
||||
|
|
|
@ -151,28 +151,6 @@ void getSwitchesPosition(bool startup)
|
|||
CHECK_2POS(SW_SE);
|
||||
CHECK_3POS(1, SW_SF);
|
||||
switchesPos = newPos;
|
||||
|
||||
int i = 0;
|
||||
StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[POT1+i];
|
||||
if (calib->count>0 && calib->count<XPOTS_MULTIPOS_COUNT) {
|
||||
uint8_t pos = anaIn(POT1+i) / (2*RESX/calib->count);
|
||||
uint8_t previousPos = potsPos[i] >> 4;
|
||||
uint8_t previousStoredPos = potsPos[i] & 0x0F;
|
||||
if (startup) {
|
||||
potsPos[i] = (pos << 4) | pos;
|
||||
}
|
||||
else if (pos != previousPos) {
|
||||
potsLastposStart[i] = get_tmr10ms();
|
||||
potsPos[i] = (pos << 4) | previousStoredPos;
|
||||
}
|
||||
else if (g_eeGeneral.switchesDelay==SWITCHES_DELAY_NONE || (tmr10ms_t)(get_tmr10ms() - potsLastposStart[i]) > SWITCHES_DELAY()) {
|
||||
potsLastposStart[i] = 0;
|
||||
potsPos[i] = (pos << 4) | pos;
|
||||
if (previousStoredPos != pos) {
|
||||
PLAY_SWITCH_MOVED(SWSRC_LAST_SWITCH+i*XPOTS_MULTIPOS_COUNT+pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
#include "diskio.h"
|
||||
#include <string.h> // memcpy
|
||||
#include "../../opentx.h"
|
||||
#include <string.h>
|
||||
#include "opentx.h"
|
||||
#include "sdio_sd.h"
|
||||
|
||||
#define BLOCK_SIZE 512 /* Block Size in Bytes */
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "../horus/sdio_sd.h"
|
||||
|
||||
#include "sdio_sd.h"
|
||||
#include "../../debug.h"
|
||||
|
||||
/** @addtogroup Utilities
|
||||
|
@ -1152,12 +1150,10 @@ OPTIMIZE("O0") SD_Error SD_ReadBlock(uint8_t *readbuff, uint32_t ReadAddr, uint1
|
|||
SD_LowLevel_DMA_RxConfig((uint32_t *)readbuff, BlockSize);
|
||||
#endif
|
||||
|
||||
if (CardType == SDIO_HIGH_CAPACITY_SD_CARD) {
|
||||
if (CardType == SDIO_HIGH_CAPACITY_SD_CARD)
|
||||
BlockSize = 512;
|
||||
}
|
||||
else {
|
||||
else
|
||||
ReadAddr *= 512;
|
||||
}
|
||||
|
||||
/* Set Block Size for Card */
|
||||
SDIO_CmdInitStructure.SDIO_Argument = (uint32_t) BlockSize;
|
||||
|
@ -1281,12 +1277,10 @@ OPTIMIZE("O0") SD_Error SD_ReadMultiBlocks(uint8_t *readbuff, uint32_t ReadAddr,
|
|||
SD_LowLevel_DMA_RxConfig((uint32_t *)readbuff, (NumberOfBlocks * BlockSize));
|
||||
SDIO_DMACmd(ENABLE);
|
||||
|
||||
if (CardType == SDIO_HIGH_CAPACITY_SD_CARD) {
|
||||
if (CardType == SDIO_HIGH_CAPACITY_SD_CARD)
|
||||
BlockSize = 512;
|
||||
}
|
||||
else {
|
||||
else
|
||||
ReadAddr *= 512;
|
||||
}
|
||||
|
||||
/*!< Set Block Size for Card */
|
||||
SDIO_CmdInitStructure.SDIO_Argument = (uint32_t) BlockSize;
|
||||
|
@ -1417,12 +1411,10 @@ OPTIMIZE("O0") SD_Error SD_WriteBlock(uint8_t *writebuff, uint32_t WriteAddr, ui
|
|||
SDIO_DMACmd(ENABLE);
|
||||
#endif
|
||||
|
||||
if (CardType == SDIO_HIGH_CAPACITY_SD_CARD) {
|
||||
if (CardType == SDIO_HIGH_CAPACITY_SD_CARD)
|
||||
BlockSize = 512;
|
||||
}
|
||||
else {
|
||||
else
|
||||
WriteAddr *= 512;
|
||||
}
|
||||
|
||||
/* Set Block Size for Card */
|
||||
SDIO_CmdInitStructure.SDIO_Argument = (uint32_t) BlockSize;
|
||||
|
|
|
@ -136,12 +136,7 @@ extern uint8_t telemetryProtocol;
|
|||
#define IS_FRSKY_SPORT_PROTOCOL() (false)
|
||||
#endif
|
||||
|
||||
#if defined(PCBFLAMENCO)
|
||||
inline uint8_t modelTelemetryProtocol()
|
||||
{
|
||||
return g_model.telemetryProtocol;
|
||||
}
|
||||
#elif defined(CPUSTM32)
|
||||
#if defined(PCBTARANIS) || defined(PCBHORUS)
|
||||
inline uint8_t modelTelemetryProtocol()
|
||||
{
|
||||
#if defined(CROSSFIRE)
|
||||
|
|
|
@ -1074,8 +1074,13 @@
|
|||
#define TR_SCRIPT "Script"
|
||||
#define TR_INPUTS "Inputs"
|
||||
#define TR_OUTPUTS "Outputs"
|
||||
#if defined(COLORLCD)
|
||||
#define TR_EEBACKUP "EEPROM backup"
|
||||
#define TR_FACTORYRESET "Factory reset"
|
||||
#else
|
||||
#define TR_EEBACKUP "\012[ENTER Long]: EEPROM backup"
|
||||
#define TR_FACTORYRESET "\012[MENU Long]: Factory reset"
|
||||
#endif
|
||||
#define TR_CONFIRMRESET "Erase ALL models and settings?"
|
||||
#define TR_TO_MANY_LUA_SCRIPTS "Too many Lua scripts!"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue