From 06aed9749f649d41bf0830c5a45c6d504b47ab4e Mon Sep 17 00:00:00 2001 From: joeycastillo Date: Thu, 10 Oct 2024 20:57:57 -0400 Subject: [PATCH] update 'new watch face' script --- {movement/template => template}/template.c | 0 {movement/template => template}/template.h | 6 +----- {movement/template => template}/watch_face.py | 6 +++--- watch-faces.mk | 1 + 4 files changed, 5 insertions(+), 8 deletions(-) rename {movement/template => template}/template.c (100%) rename {movement/template => template}/template.h (94%) rename {movement/template => template}/watch_face.py (94%) diff --git a/movement/template/template.c b/template/template.c similarity index 100% rename from movement/template/template.c rename to template/template.c diff --git a/movement/template/template.h b/template/template.h similarity index 94% rename from movement/template/template.h rename to template/template.h index 7f2612c7..3efb2019 100644 --- a/movement/template/template.h +++ b/template/template.h @@ -22,8 +22,7 @@ * SOFTWARE. */ -#ifndef <#WATCH_FACE_NAME#>_FACE_H_ -#define <#WATCH_FACE_NAME#>_FACE_H_ +#pragma once #include "movement.h" @@ -51,6 +50,3 @@ void <#watch_face_name#>_face_resign(void *context); <#watch_face_name#>_face_resign, \ NULL, \ }) - -#endif // <#WATCH_FACE_NAME#>_FACE_H_ - diff --git a/movement/template/watch_face.py b/template/watch_face.py similarity index 94% rename from movement/template/watch_face.py rename to template/watch_face.py index 4143b01f..26d78cdf 100644 --- a/movement/template/watch_face.py +++ b/template/watch_face.py @@ -88,10 +88,10 @@ def main(): line_to_insert = f"#include \"{args.watch_face_name}_face.h\"\n" update_include_file(f"..{os.sep}movement_faces.h", INCLUDE_INDICATOR, line_to_insert) - line_to_insert = f" ..{os.sep}watch_faces{os.sep}{args.watch_face_type}{os.sep}{args.watch_face_name}_face.c \\\n" - update_include_file(f"..{os.sep}make{os.sep}Makefile", MAKEFILE_INDICATOR, line_to_insert) + line_to_insert = f" .{os.sep}watch-faces{os.sep}{args.watch_face_type}{os.sep}{args.watch_face_name}_face.c \\\n" + update_include_file(f"..{os.sep}watch-faces.mk", MAKEFILE_INDICATOR, line_to_insert) - output_dir = f"..{os.sep}watch_faces{os.sep}{args.watch_face_type}{os.sep}" + output_dir = f"..{os.sep}watch-faces{os.sep}{args.watch_face_type}{os.sep}" write_modified_template(args, "h", output_dir) write_modified_template(args, "c", output_dir) diff --git a/watch-faces.mk b/watch-faces.mk index 98c7ef8c..4d2e0fed 100644 --- a/watch-faces.mk +++ b/watch-faces.mk @@ -15,3 +15,4 @@ SRCS += \ ./watch-faces/sensor/voltage_face.c \ ./watch-faces/settings/set_time_face.c \ ./watch-faces/settings/preferences_face.c \ +# New watch faces go above this line.