otaku chimes
This commit is contained in:
parent
3968b4eb4f
commit
e84c049e65
|
@ -232,6 +232,11 @@ void DisplayApp::Refresh() {
|
||||||
|
|
||||||
Messages msg;
|
Messages msg;
|
||||||
if (xQueueReceive(msgQueue, &msg, queueTimeout) == pdTRUE) {
|
if (xQueueReceive(msgQueue, &msg, queueTimeout) == pdTRUE) {
|
||||||
|
|
||||||
|
// let's do otaku chimes
|
||||||
|
uint8_t myHour = dateTimeController.Hours();
|
||||||
|
uint8_t myChimes = 9-(((int)floor(myHour/2))%6);
|
||||||
|
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case Messages::DimScreen:
|
case Messages::DimScreen:
|
||||||
DimScreen();
|
DimScreen();
|
||||||
|
@ -377,7 +382,40 @@ void DisplayApp::Refresh() {
|
||||||
break;
|
break;
|
||||||
case Messages::Chime:
|
case Messages::Chime:
|
||||||
LoadNewScreen(Apps::Clock, DisplayApp::FullRefreshDirections::None);
|
LoadNewScreen(Apps::Clock, DisplayApp::FullRefreshDirections::None);
|
||||||
motorController.RunForDuration(35);
|
|
||||||
|
// hour chime
|
||||||
|
// 0 9
|
||||||
|
// 1 9
|
||||||
|
// 2 8
|
||||||
|
// 3 8
|
||||||
|
// 4 7
|
||||||
|
// 5 7
|
||||||
|
// 6 6
|
||||||
|
// 7 6
|
||||||
|
// 8 5
|
||||||
|
// 9 5
|
||||||
|
// 10 4
|
||||||
|
// 11 4
|
||||||
|
// 12 9
|
||||||
|
// 13 9
|
||||||
|
// 14 8
|
||||||
|
// 15 8
|
||||||
|
// 16 7
|
||||||
|
// 17 7
|
||||||
|
// 18 6
|
||||||
|
// 19 6
|
||||||
|
// 20 5
|
||||||
|
// 21 5
|
||||||
|
// 22 4
|
||||||
|
// 23 4
|
||||||
|
motorController.RunForDuration(15);
|
||||||
|
// NRF_LOG_INFO("buzzing %d times", myChimes);
|
||||||
|
|
||||||
|
for (uint8_t i=0; i<myChimes; i++){
|
||||||
|
// NRF_LOG_INFO("buzz!");
|
||||||
|
motorController.RunForDuration(254);
|
||||||
|
vTaskDelay(254);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case Messages::OnChargingEvent:
|
case Messages::OnChargingEvent:
|
||||||
RestoreBrightness();
|
RestoreBrightness();
|
||||||
|
|
|
@ -302,10 +302,10 @@ void WatchFaceAnalog::drawWatchFaceWadokei(){
|
||||||
sHour = hour;
|
sHour = hour;
|
||||||
sMinute = minute;
|
sMinute = minute;
|
||||||
|
|
||||||
hour_point_trace[0] = CoordinateRelocate(HourLength*.7, hourAngle+90-33);
|
hour_point_trace[0] = CoordinateRelocate(28, hourAngle+90-66); //axis radius minus line stroke
|
||||||
hour_point_trace[1] = CoordinateRelocate(HourLength, hourAngle+90);
|
hour_point_trace[1] = CoordinateRelocate(HourLength, hourAngle+90);
|
||||||
|
|
||||||
hour_point[0] = CoordinateRelocate(HourLength*.7, hourAngle+90+33);
|
hour_point[0] = CoordinateRelocate(28, hourAngle+90+66); //axis radius minus line stroke
|
||||||
hour_point[1] = CoordinateRelocate(HourLength, hourAngle+90);
|
hour_point[1] = CoordinateRelocate(HourLength, hourAngle+90);
|
||||||
|
|
||||||
lv_line_set_points(hour_body, hour_point, 2);
|
lv_line_set_points(hour_body, hour_point, 2);
|
||||||
|
|
|
@ -42,8 +42,8 @@ SettingSetTime::SettingSetTime(Pinetime::Controllers::DateTime& dateTimeControll
|
||||||
|
|
||||||
lv_obj_t* staticLabel = lv_label_create(lv_scr_act(), nullptr);
|
lv_obj_t* staticLabel = lv_label_create(lv_scr_act(), nullptr);
|
||||||
lv_obj_set_style_local_text_font(staticLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);
|
lv_obj_set_style_local_text_font(staticLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);
|
||||||
lv_label_set_text_static(staticLabel, "00:00:00");
|
lv_label_set_text_static(staticLabel, ":00");
|
||||||
lv_obj_align(staticLabel, lv_scr_act(), LV_ALIGN_CENTER, 0, POS_Y_TEXT);
|
lv_obj_align(staticLabel, lv_scr_act(), LV_ALIGN_IN_RIGHT_MID, -33, POS_Y_TEXT);
|
||||||
|
|
||||||
hourCounter.Create();
|
hourCounter.Create();
|
||||||
if (settingsController.GetClockType() == Controllers::Settings::ClockType::H12) {
|
if (settingsController.GetClockType() == Controllers::Settings::ClockType::H12) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user