Cosmetics
This commit is contained in:
+2
-10
@@ -30,16 +30,12 @@
|
||||
#include "serial.h"
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
uint8_t auxSerialTracesEnabled();
|
||||
|
||||
#if defined(SIMU)
|
||||
typedef void (*traceCallbackFunc)(const char * text);
|
||||
EXTERN_C(typedef void (*traceCallbackFunc)(const char * text));
|
||||
extern traceCallbackFunc traceCallback;
|
||||
void debugPrintf(const char * format, ...);
|
||||
EXTERN_C(void debugPrintf(const char * format, ...));
|
||||
#elif defined(SEMIHOSTING)
|
||||
#include <stdio.h>
|
||||
#define debugPrintf(...) printf(__VA_ARGS__)
|
||||
@@ -51,10 +47,6 @@ uint8_t auxSerialTracesEnabled();
|
||||
#define debugPrintf(...)
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#define TRACE_NOCRLF(...) debugPrintf(__VA_ARGS__)
|
||||
#define TRACE(f_, ...) debugPrintf((f_ "\r\n"), ##__VA_ARGS__)
|
||||
#define DUMP(data, size) dump(data, size)
|
||||
|
||||
+12
-2
@@ -70,9 +70,9 @@
|
||||
#endif
|
||||
|
||||
#if __GNUC__
|
||||
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
|
||||
#define PACK(__Declaration__) __Declaration__ __attribute__((__packed__))
|
||||
#else
|
||||
#define PACK( __Declaration__ ) __pragma( pack(push, 1) ) __Declaration__ __pragma( pack(pop) )
|
||||
#define PACK(__Declaration__) __pragma( pack(push, 1) ) __Declaration__ __pragma( pack(pop) )
|
||||
#endif
|
||||
|
||||
#if defined(SIMU)
|
||||
@@ -87,4 +87,14 @@
|
||||
#define DIM(__arr) (sizeof((__arr)) / sizeof((__arr)[0]))
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN_C(__Declaration__) extern "C" { __Declaration__ ; }
|
||||
#define EXTERN_C_START extern "C" {
|
||||
#define EXTERN_C_END }
|
||||
#else
|
||||
#define EXTERN_C(__Declaration__) __Declaration__
|
||||
#define EXTERN_C_START
|
||||
#define EXTERN_C_END
|
||||
#endif
|
||||
|
||||
#endif // _DEFINITIONS_H_
|
||||
|
||||
@@ -125,7 +125,7 @@ class InputEditWindow: public Page {
|
||||
|
||||
void updateCurves() {
|
||||
FormGridLayout grid;
|
||||
grid.setLabelWidth(120);
|
||||
grid.setLabelWidth(INPUT_EDIT_LABELS_WIDTH);
|
||||
|
||||
updateCurvesWindow->clear();
|
||||
|
||||
@@ -166,7 +166,7 @@ class InputEditWindow: public Page {
|
||||
NumberEdit * edit;
|
||||
|
||||
FormGridLayout grid;
|
||||
grid.setLabelWidth(120);
|
||||
grid.setLabelWidth(INPUT_EDIT_LABELS_WIDTH);
|
||||
grid.spacer(PAGE_PADDING);
|
||||
|
||||
ExpoData * line = expoAddress(index) ;
|
||||
@@ -196,6 +196,10 @@ class InputEditWindow: public Page {
|
||||
});
|
||||
grid.nextLine();
|
||||
|
||||
#if LCD_H > LCD_W
|
||||
grid.setMarginRight(10);
|
||||
#endif
|
||||
|
||||
// Name
|
||||
new StaticText(window, grid.getLabelSlot(), STR_EXPONAME);
|
||||
new TextEdit(window, grid.getFieldSlot(), line->name, sizeof(line->name));
|
||||
|
||||
@@ -346,7 +346,7 @@ void generalDefault()
|
||||
uint16_t evalChkSum()
|
||||
{
|
||||
uint16_t sum = 0;
|
||||
const int16_t *calibValues = (const int16_t *) &g_eeGeneral.calib[0];
|
||||
const int16_t * calibValues = (const int16_t *) &g_eeGeneral.calib[0];
|
||||
for (int i=0; i<12; i++)
|
||||
sum += calibValues[i];
|
||||
return sum;
|
||||
@@ -370,12 +370,12 @@ void defaultInputs()
|
||||
expo->weight = 100;
|
||||
expo->mode = 3; // TODO constant
|
||||
#if defined(TRANSLATIONS_CZ)
|
||||
for (int c=0; c<4; c++) {
|
||||
g_model.inputNames[i][c] = char2zchar(STR_INPUTNAMES[1+4*(stick_index-1)+c]);
|
||||
for (int c = 0; c < 4; c++) {
|
||||
g_model.inputNames[i][c] = STR_INPUTNAMES[1+4*(stick_index-1)+c];
|
||||
}
|
||||
#else
|
||||
for (int c=0; c<3; c++) {
|
||||
g_model.inputNames[i][c] = char2zchar(STR_VSRCRAW[2 + 4 * stick_index + c]);
|
||||
for (int c = 0; c < 3; c++) {
|
||||
g_model.inputNames[i][c] = STR_VSRCRAW[2 + 4 * stick_index + c];
|
||||
}
|
||||
#if LEN_INPUT_NAME > 3
|
||||
g_model.inputNames[i][3] = '\0';
|
||||
|
||||
@@ -130,4 +130,6 @@ enum LcdColorIndex
|
||||
#define FONT_TABLE_SIZE 1
|
||||
#endif
|
||||
|
||||
constexpr uint32_t INPUT_EDIT_LABELS_WIDTH = 120;
|
||||
|
||||
#endif // _LIBOPENUI_CONFIG_H_
|
||||
|
||||
@@ -128,4 +128,6 @@ enum LcdColorIndex
|
||||
#define FONT_TABLE_SIZE 1
|
||||
#endif
|
||||
|
||||
constexpr uint32_t INPUT_EDIT_LABELS_WIDTH = 80;
|
||||
|
||||
#endif // _LIBOPENUI_CONFIG_H_
|
||||
|
||||
Reference in New Issue
Block a user