fix misspelling of pulsometer
This commit is contained in:
parent
05fe055f99
commit
c27dbc779b
@ -26,7 +26,7 @@ SRCS += \
|
||||
../watch_faces/clock/simple_clock_face.c \
|
||||
../watch_faces/settings/preferences_face.c \
|
||||
../watch_faces/settings/set_time_face.c \
|
||||
../watch_faces/complications/pulseometer_face.c \
|
||||
../watch_faces/complications/pulsometer_face.c \
|
||||
|
||||
# Leave this line at the bottom of the file; it has all the targets for making your project.
|
||||
include $(TOP)/rules.mk
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "simple_clock_face.h"
|
||||
#include "preferences_face.h"
|
||||
#include "set_time_face.h"
|
||||
#include "pulseometer_face.h"
|
||||
#include "pulsometer_face.h"
|
||||
|
||||
const watch_face_t watch_faces[] = {
|
||||
simple_clock_face,
|
||||
|
@ -1,25 +0,0 @@
|
||||
#ifndef PULSEOMETER_FACE_H_
|
||||
#define PULSEOMETER_FACE_H_
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
typedef struct {
|
||||
bool measuring;
|
||||
int16_t pulse;
|
||||
int16_t ticks;
|
||||
} PulsometerState;
|
||||
|
||||
void pulseometer_face_setup(movement_settings_t *settings, void ** context_ptr);
|
||||
void pulseometer_face_activate(movement_settings_t *settings, void *context);
|
||||
bool pulseometer_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
|
||||
void pulseometer_face_resign(movement_settings_t *settings, void *context);
|
||||
|
||||
static const watch_face_t pulseometer_face = {
|
||||
pulseometer_face_setup,
|
||||
pulseometer_face_activate,
|
||||
pulseometer_face_loop,
|
||||
pulseometer_face_resign,
|
||||
NULL
|
||||
};
|
||||
|
||||
#endif // PULSEOMETER_FACE_H_
|
@ -1,23 +1,23 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "pulseometer_face.h"
|
||||
#include "pulsometer_face.h"
|
||||
#include "watch.h"
|
||||
|
||||
#define PULSOMETER_FACE_FREQUENCY_FACTOR (4ul) // refresh rate will be 2 to this power Hz (0 for 1 Hz, 2 for 4 Hz, etc.)
|
||||
#define PULSOMETER_FACE_FREQUENCY (1 << PULSOMETER_FACE_FREQUENCY_FACTOR)
|
||||
|
||||
void pulseometer_face_setup(movement_settings_t *settings, void ** context_ptr) {
|
||||
void pulsometer_face_setup(movement_settings_t *settings, void ** context_ptr) {
|
||||
(void) settings;
|
||||
if (*context_ptr == NULL) *context_ptr = malloc(sizeof(PulsometerState));
|
||||
}
|
||||
|
||||
void pulseometer_face_activate(movement_settings_t *settings, void *context) {
|
||||
void pulsometer_face_activate(movement_settings_t *settings, void *context) {
|
||||
(void) settings;
|
||||
memset(context, 0, sizeof(PulsometerState));
|
||||
}
|
||||
|
||||
bool pulseometer_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
|
||||
printf("pulseometer_face_loop\n");
|
||||
bool pulsometer_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
|
||||
printf("pulsometer_face_loop\n");
|
||||
(void) settings;
|
||||
PulsometerState *pulsometer_state = (PulsometerState *)context;
|
||||
char buf[14];
|
||||
@ -81,7 +81,7 @@ bool pulseometer_face_loop(movement_event_t event, movement_settings_t *settings
|
||||
return true;
|
||||
}
|
||||
|
||||
void pulseometer_face_resign(movement_settings_t *settings, void *context) {
|
||||
void pulsometer_face_resign(movement_settings_t *settings, void *context) {
|
||||
(void) settings;
|
||||
(void) context;
|
||||
}
|
25
movement/watch_faces/complications/pulsometer_face.h
Normal file
25
movement/watch_faces/complications/pulsometer_face.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef PULSOMETER_FACE_H_
|
||||
#define PULSOMETER_FACE_H_
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
typedef struct {
|
||||
bool measuring;
|
||||
int16_t pulse;
|
||||
int16_t ticks;
|
||||
} PulsometerState;
|
||||
|
||||
void pulsometer_face_setup(movement_settings_t *settings, void ** context_ptr);
|
||||
void pulsometer_face_activate(movement_settings_t *settings, void *context);
|
||||
bool pulsometer_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
|
||||
void pulsometer_face_resign(movement_settings_t *settings, void *context);
|
||||
|
||||
static const watch_face_t pulsometer_face = {
|
||||
pulsometer_face_setup,
|
||||
pulsometer_face_activate,
|
||||
pulsometer_face_loop,
|
||||
pulsometer_face_resign,
|
||||
NULL
|
||||
};
|
||||
|
||||
#endif // PULSOMETER_FACE_H_
|
Loading…
x
Reference in New Issue
Block a user