Index: Common.h =================================================================== diff -u -rf4ee38d0f7a18e47e6e4980360a7eac9220d244a -rd352b607eeb20a7f06c32d776e5db2e35932ede2 --- Common.h (.../Common.h) (revision f4ee38d0f7a18e47e6e4980360a7eac9220d244a) +++ Common.h (.../Common.h) (revision d352b607eeb20a7f06c32d776e5db2e35932ede2) @@ -25,11 +25,11 @@ // #define RM46_EVAL_BOARD_TARGET 1 // #define SIMULATE_UI 1 #define DEBUG_ENABLED 1 -// #define ACK_NOT_IMPLEMENTED 1 #define UF_TEST_ENABLED 1 - #define DISABLE_CRC_ERROR 1 +// #define DISABLE_CRC_ERROR 1 #define DISABLE_MOTOR_CURRENT_ERRORS 1 #define SHOW_RAW_FLOW_VALUES 1 +// #define CAN_TEST 1 #ifdef DEBUG_ENABLED #include @@ -123,6 +123,8 @@ // **** Common Macros **** +#define ABS(v) ((v) < 0 ? (v) * -1 : (v)) +#define FABS(v) ((v) < 0.0 ? (v) * -1.0 : (v)) #define FLOAT_TO_INT_WITH_ROUND(f) ((f) < 0.0 ? (S32)((f) - FLOAT_TO_INT_ROUNDUP_OFFSET) : (S32)((f) + FLOAT_TO_INT_ROUNDUP_OFFSET)) ///< Macro converts a floating point value to an integer. #define CAP(v, u) ((v) > (u) ? (u) : (v)) ///< Macro caps a value to a maximum. #define RANGE(v, l, u) ((v) > (u) ? (u) : ((v) < (l) ? (l) : (v))) ///< Macro enforces a range on a value. Index: RTC.c =================================================================== diff -u -r02f990b33c415985dcd9c765c49604226cb371e3 -rd352b607eeb20a7f06c32d776e5db2e35932ede2 --- RTC.c (.../RTC.c) (revision 02f990b33c415985dcd9c765c49604226cb371e3) +++ RTC.c (.../RTC.c) (revision d352b607eeb20a7f06c32d776e5db2e35932ede2) @@ -353,7 +353,6 @@ case RTC_EXEC_STATE_FAULT: // Something failed set the alarms - // TODO: set the alarms and stuff break; default: @@ -917,7 +916,7 @@ } else if ( RTCSelfTestState == RTC_SELF_TEST_STATE_COMPLETE ) { - result = RTC_EXEC_STATE_FAULT; + result = RTC_EXEC_STATE_IDLE; } return result;