auto-detect accelerometer sensor (and don't fail build for lack of a temperature sensor)
This commit is contained in:
@@ -218,13 +218,10 @@ void countdown_face_activate(void *context) {
|
||||
|
||||
movement_request_tick_frequency(1);
|
||||
quick_ticks_running = false;
|
||||
#if HAS_ACCELEROMETER
|
||||
if (state->mode != cd_running) {
|
||||
if (state->mode != cd_running && movement_enable_tap_detection_if_available()) {
|
||||
state->tap_detection_ticks = TAP_DETECTION_SECONDS;
|
||||
state->has_tapped_once = false;
|
||||
movement_enable_tap_detection_if_available();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool countdown_face_loop(movement_event_t event, void *context) {
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
#include "tc.h"
|
||||
#include "watch.h"
|
||||
|
||||
#ifdef HAS_ACCELEROMETER
|
||||
|
||||
// hacky: we're just tapping into Movement's global state.
|
||||
// we should make better API for this.
|
||||
extern uint8_t active_minutes;
|
||||
@@ -133,5 +131,3 @@ movement_watch_face_advisory_t accel_interrupt_count_face_advise(void *context)
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
#endif // HAS_ACCELEROMETER
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
#include "movement.h"
|
||||
#include "watch.h"
|
||||
|
||||
#ifdef HAS_ACCELEROMETER
|
||||
|
||||
typedef struct {
|
||||
uint8_t new_threshold;
|
||||
uint8_t threshold;
|
||||
@@ -56,5 +54,3 @@ movement_watch_face_advisory_t accel_interrupt_count_face_advise(void *context);
|
||||
accel_interrupt_count_face_resign, \
|
||||
accel_interrupt_count_face_advise, \
|
||||
})
|
||||
|
||||
#endif // HAS_ACCELEROMETER
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
#include "movement_activity.h"
|
||||
#include "watch_utility.h"
|
||||
|
||||
#ifdef HAS_ACCELEROMETER
|
||||
|
||||
static void _activity_logging_face_update_display(activity_logging_state_t *state, bool clock_mode_24h) {
|
||||
char buf[8];
|
||||
uint32_t count = 0;
|
||||
@@ -164,5 +162,3 @@ bool activity_logging_face_loop(movement_event_t event, void *context) {
|
||||
void activity_logging_face_resign(void *context) {
|
||||
(void) context;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
|
||||
#include "pins.h"
|
||||
|
||||
#ifdef HAS_ACCELEROMETER
|
||||
|
||||
/*
|
||||
* ACTIVITY LOGGING
|
||||
*
|
||||
@@ -77,5 +75,3 @@ movement_watch_face_advisory_t activity_logging_face_advise(void *context);
|
||||
activity_logging_face_resign, \
|
||||
NULL, \
|
||||
})
|
||||
|
||||
#endif // HAS_TEMPERATURE_SENSOR
|
||||
|
||||
Reference in New Issue
Block a user