Skip to content
Snippets Groups Projects
Commit bccea2d4 authored by Aapo Torkkeli's avatar Aapo Torkkeli
Browse files

Improve readability.

parent 9c1d566e
Branches
No related tags found
No related merge requests found
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
#define DEAD_BEEF 0xDEADBEEF /**< Value used as error code on stack dump, can be used to identify stack location on stack unwind. */ #define DEAD_BEEF 0xDEADBEEF /**< Value used as error code on stack dump, can be used to identify stack location on stack unwind. */
#define APP_TIMER_MAX_TIMERS 1 /**< Maximum number of timers used by the application. */ #define APP_TIMER_MAX_TIMERS 1 /**< Maximum number of timers used by the application. */
#define TIMER_INTERVAL APP_TIMER_TICKS(1000) #define TIMER_INTERVAL APP_TIMER_TICKS(100)
// Determines if temperature type is given as characteristic (1) or as a field of measurement (0) // Determines if temperature type is given as characteristic (1) or as a field of measurement (0)
#define TEMP_TYPE_AS_CHARACTERISTIC 0 #define TEMP_TYPE_AS_CHARACTERISTIC 0
......
...@@ -169,7 +169,7 @@ void calculate_orientation(){ ...@@ -169,7 +169,7 @@ void calculate_orientation(){
if ( (z_axis_abs > x_axis_abs) && (z_axis_abs > y_axis_abs)) { if ( (z_axis_abs > x_axis_abs) && (z_axis_abs > y_axis_abs)) {
// base orientation on Z // base orientation on Z
if (z_axis > 0) { if (z_axis > 0) {
orientation = (uint32_t) ORIENTATION_ZERO; orientation = (uint32_t) ORIENTATION_THREE;
} else { } else {
orientation = (uint32_t) ORIENTATION_ONE; orientation = (uint32_t) ORIENTATION_ONE;
} }
...@@ -178,12 +178,12 @@ void calculate_orientation(){ ...@@ -178,12 +178,12 @@ void calculate_orientation(){
if (y_axis > 0) { if (y_axis > 0) {
orientation = (uint32_t) ORIENTATION_TWO; orientation = (uint32_t) ORIENTATION_TWO;
} else { } else {
orientation = (uint32_t) ORIENTATION_THREE; orientation = (uint32_t) ORIENTATION_FOUR;
} }
} else { } else {
// base orientation on X // base orientation on X
if (x_axis < 0) { if (x_axis < 0) {
orientation = (uint32_t) ORIENTATION_FOUR; orientation = (uint32_t) ORIENTATION_ZERO;
} else { } else {
orientation = (uint32_t) ORIENTATION_FIVE; orientation = (uint32_t) ORIENTATION_FIVE;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment