From 2488110464bda873bc3c7b9abd4bec73ae5d1b04 Mon Sep 17 00:00:00 2001 From: adumelie Date: Thu, 14 Mar 2024 14:55:06 +0100 Subject: [PATCH 1/4] Fix and update documentation Fixed missing colon typo in template for minimal app example Updated reference to Apps enum after file move --- doc/code/Apps.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/code/Apps.md b/doc/code/Apps.md index b325fe98e1..1c8f8da11c 100644 --- a/doc/code/Apps.md +++ b/doc/code/Apps.md @@ -140,7 +140,7 @@ namespace Pinetime { } template <> - struct AppTraits { + struct AppTraits { static constexpr Apps app = Apps::MyApp; static constexpr const char* icon = Screens::Symbol::myApp; static Screens::Screens* Create(AppController& controllers) { @@ -176,7 +176,7 @@ Now we have our very own app, but InfiniTime does not know about it yet. The first step is to include your `MyApp.cpp` (or any new cpp files for that matter) in the compilation by adding it to [CMakeLists.txt](/CMakeLists.txt). The next step to making it launch-able is to give your app an id. -To do this, add an entry in the enum class `Pinetime::Applications::Apps` ([displayapp/Apps.h](/src/displayapp/Apps.h)). +To do this, add an entry in the enum class `Pinetime::Applications::Apps` ([displayapp/apps/Apps.h](/src/displayapp/apps/Apps.h.in)). Name this entry after your app. Add `#include "displayapp/screens/MyApp.h"` to the file [displayapp/DisplayApp.cpp](/src/displayapp/DisplayApp.cpp). From a277e98ea20ed5190735403371de97fccb9cb150 Mon Sep 17 00:00:00 2001 From: adumelie Date: Thu, 14 Mar 2024 16:38:08 +0100 Subject: [PATCH 2/4] Typo in code example --- doc/code/Apps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/code/Apps.md b/doc/code/Apps.md index 1c8f8da11c..b0698b2b94 100644 --- a/doc/code/Apps.md +++ b/doc/code/Apps.md @@ -143,7 +143,7 @@ namespace Pinetime { struct AppTraits { static constexpr Apps app = Apps::MyApp; static constexpr const char* icon = Screens::Symbol::myApp; - static Screens::Screens* Create(AppController& controllers) { + static Screens::Screen* Create(AppController& controllers) { return new Screens::MyApp(); } }; From 145daa12627524f6a5e51765da3cb5ac86430268 Mon Sep 17 00:00:00 2001 From: adumelie Date: Thu, 14 Mar 2024 16:39:36 +0100 Subject: [PATCH 3/4] More typos in code example --- doc/code/Apps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/code/Apps.md b/doc/code/Apps.md index b0698b2b94..bf71eab429 100644 --- a/doc/code/Apps.md +++ b/doc/code/Apps.md @@ -142,7 +142,7 @@ namespace Pinetime { template <> struct AppTraits { static constexpr Apps app = Apps::MyApp; - static constexpr const char* icon = Screens::Symbol::myApp; + static constexpr const char* icon = Screens::Symbols::myApp; static Screens::Screen* Create(AppController& controllers) { return new Screens::MyApp(); } From 1f0a0bffebe3d9d591eb74aa10ce1cd0db7ef075 Mon Sep 17 00:00:00 2001 From: adumelie Date: Thu, 14 Mar 2024 16:41:17 +0100 Subject: [PATCH 4/4] Typo in example code --- doc/code/Apps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/code/Apps.md b/doc/code/Apps.md index bf71eab429..44c4ed6580 100644 --- a/doc/code/Apps.md +++ b/doc/code/Apps.md @@ -143,7 +143,7 @@ namespace Pinetime { struct AppTraits { static constexpr Apps app = Apps::MyApp; static constexpr const char* icon = Screens::Symbols::myApp; - static Screens::Screen* Create(AppController& controllers) { + static Screens::Screen* Create(AppControllers& controllers) { return new Screens::MyApp(); } };