Diff » lepto.diff
include/lepto/can_message_tdt.h | ||
---|---|---|
171 | 171 |
fadeTime = 0x88 + OBJECT_OFFSET, |
172 | 172 |
eventCodeRepeated = 0x89 + OBJECT_OFFSET, |
173 | 173 |
logCode = 0x8A + OBJECT_OFFSET, |
174 |
logCodeRepeated = 0x8B + OBJECT_OFFSET,
|
|
174 |
lastError = 0x8B + OBJECT_OFFSET,
|
|
175 | 175 |
|
176 | 176 |
startSwitches = 0x90 + OBJECT_OFFSET, // None |
177 | 177 |
startAmbientSwitches = 0x90 + OBJECT_OFFSET, // None |
include/lepto/lepto.h | ||
---|---|---|
57 | 57 |
//#define ARG_ "define feature as '1', 'y' or 'yes' to enable it." |
58 | 58 |
// Need two stages to resolve defines; e.g. make "ARG_" instead of "ARG_FOO" |
59 | 59 |
#define IS_ENABLED(a) _V_IS_ENABLED( CONFIG_ ## a ) |
60 |
#define IS_SET(a) _V_IS_ENABLED( a ) |
|
60 | 61 |
// #define _V_IS_ENABLED(a) ARG_##a |
61 | 62 |
#define _V_IS_ENABLED(a) __V_IS_ENABLED( a ) |
62 | 63 |
#define __V_IS_ENABLED(a) ARG_##a |
include/lepto/log.h | ||
---|---|---|
41 | 41 | |
42 | 42 |
// { exception(); }; |
43 | 43 | |
44 | ||
45 | ||
46 | 44 |
enum class ELogCategory |
47 | 45 |
{ |
48 | 46 |
Debug = 0, |
49 |
Null = 0, |
|
50 |
Good = 1, |
|
51 |
Info = 1, |
|
52 |
Caution = 2, |
|
53 |
Warning = 3, |
|
54 |
ErrorStart = 4, |
|
55 |
Critical = 4, |
|
56 |
Fatal = 5, |
|
57 |
ErrorEnd = 5, |
|
58 |
Beckon = 6, |
|
59 |
Calm = 7, |
|
60 | ||
61 |
Loop = 8, |
|
47 |
Good = 0, |
|
48 |
Info = 0, |
|
49 |
Caution = 1, |
|
50 |
Warning = 2, |
|
51 |
Critical = 3, |
|
52 |
Fatal = 4, |
|
53 | ||
54 |
Function = 8, // Function area |
|
55 |
Beckon = 8, // |
|
56 |
Calm = 9, |
|
57 |
//Loop = 8, |
|
62 | 58 |
}; |
63 | 59 | |
60 |
static_assert (3/4 == 0, "Round problem" ); |
|
61 |
static_assert (4/4 == 1, "" ); |
|
62 | ||
64 | 63 |
enum class ELogCode: int; |
65 | 64 | |
66 | 65 |
inline constexpr ELogCode operator| (ELogCategory cat, int i) |
src/log.cpp | ||
---|---|---|
31 | 31 |
[(int)ELogCategory::Critical]=ANSI_RED "Error: ", |
32 | 32 |
[(int)ELogCategory::Fatal]=ANSI_RED "Fatal: " }; |
33 | 33 |
#else |
34 |
{ [(int)ELogCategory::Debug]="", |
|
35 |
[(int)ELogCategory::Good]="", |
|
36 |
[(int)ELogCategory::Caution]="C:", |
|
37 |
[(int)ELogCategory::Warning]="W:", |
|
38 |
[(int)ELogCategory::Critical]="E:", |
|
39 |
[(int)ELogCategory::Fatal]="F:" }; |
|
34 |
{ [ (int)ELogCategory::Debug ]="", |
|
35 |
[(int)ELogCategory::Caution ]="C:", |
|
36 |
[(int)ELogCategory::Warning ]="W:", |
|
37 |
[(int)ELogCategory::Critical ]="E:", |
|
38 |
[(int)ELogCategory::Fatal ]="F:" }; |
|
40 | 39 |
#endif |
41 | 40 | |
42 | 41 |
#if 0 |