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