Multi face support, analog clock, 12/24 config
This commit is contained in:
18
src/components/settings/Settings.cpp
Normal file
18
src/components/settings/Settings.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "Settings.h"
|
||||
|
||||
using namespace Pinetime::Controllers;
|
||||
|
||||
|
||||
// TODO (team):
|
||||
// Read and write the settings to Flash
|
||||
//
|
||||
|
||||
void Settings::Init() {
|
||||
|
||||
// default Clock face
|
||||
clockFace = 0;
|
||||
|
||||
clockType = ClockType::H24;
|
||||
|
||||
}
|
||||
|
30
src/components/settings/Settings.h
Normal file
30
src/components/settings/Settings.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Controllers {
|
||||
class Settings {
|
||||
public:
|
||||
enum class ClockType {H24, H12};
|
||||
|
||||
void Init();
|
||||
|
||||
void SetClockFace( uint8_t face ) { clockFace = face; };
|
||||
uint8_t GetClockFace() { return clockFace; };
|
||||
|
||||
void SetAppMenu( uint8_t menu ) { appMenu = menu; };
|
||||
uint8_t GetAppMenu() { return appMenu; };
|
||||
|
||||
void SetClockType( ClockType clocktype ) { clockType = clocktype; };
|
||||
ClockType GetClockType() { return clockType; };
|
||||
|
||||
|
||||
private:
|
||||
uint8_t clockFace = 0;
|
||||
uint8_t appMenu = 0;
|
||||
|
||||
ClockType clockType = ClockType::H24;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user