diff --git a/README.md b/README.md index 808dfd4..7693174 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ A somewhat portable relatively-stylish pixel-art clock/weather station. ![](docs/img/hero.jpg) +More photos in [the gallery](https://pis-os.genjit.su/index.html#photos) + ## Available widgets * Clock @@ -115,7 +117,7 @@ A somewhat portable relatively-stylish pixel-art clock/weather station. * [HIRO — Space Harrier](https://datadiscs.bandcamp.com/track/main-theme): [MIDI](helper/chimes/space_harrier.mid) (scale altered for 1-bit output range) * [A-ha — Take On Me](https://www.youtube.com/watch?v=djV11Xbc914): [MIDI](helper/chimes/takeonme.mid) * [Ennio Morricone - My Name Is Nobody](https://www.youtube.com/watch?v=srSpyXwz-MQ): [MIDI](helper/chimes/mynameisnobody.mid) -* [PPK - ResuRection (ППК - Воскрешение)](https://www.youtube.com/watch?v=KvOR2E_hZsw): [MIDI](helper/chimes/ppk.mid) +* [PPK - ResuRection (ППК - Воскрешение)](https://www.youtube.com/watch?v=KvOR2E_hZsw): [MIDI](helper/chimes/ppk.mid), [MP3](docs/rec/gagarin.mp3) * [Owl City - Fireflies](https://www.youtube.com/watch?v=psuRGfAaju4): [MIDI](helper/chimes/fireflies.mid) * [Ado - Odo](https://www.youtube.com/watch?v=YnSW8ian29w): [MIDI](helper/chimes/odo.mid) * [ZUN - Legend of Hourai](https://www.youtube.com/watch?v=d2_tY7cl818): [MIDI](helper/chimes/hourai_sou1.mid) based on work by sou1 diff --git a/data/credits.txt b/data/credits.txt index 6f6e692..8ffaee3 100644 --- a/data/credits.txt +++ b/data/credits.txt @@ -39,4 +39,6 @@ Greetz to: - Xavier - Engineegor - Atsuko & Nina +- Dancing Zombie +- NightRadio -... and YOU! \ No newline at end of file diff --git a/data/lang/ja.lang b/data/lang/ja.lang index 6e2cdf7..0cef03c 100644 --- a/data/lang/ja.lang +++ b/data/lang/ja.lang @@ -122,8 +122,8 @@ "P, hPa": "気圧 hPa", "Only Once": "一回のみ", - "Enabled": "このアラームを使用する", - "Repeat on": "繰り返し日程", + "Enabled": "アラーム", + "Repeat on": "スケジュール設定", "Time": "時刻", "Smart Alarm": "スマートアラーム", "Smart margin": "スマートアラームの余裕時間(分)", @@ -133,7 +133,7 @@ "SNOOZE": "スヌーズ", "STOP": "アラーム停止", - "HOLD": "押し続けて", + "HOLD": "長押し", "BB_DSCNCT": "接続されていません", "BB_CNCT_GUIDE": "\u001A を押して接続を開始してください", diff --git a/docs/rec/gagarin.mp3 b/docs/rec/gagarin.mp3 new file mode 100644 index 0000000..1ec72a8 Binary files /dev/null and b/docs/rec/gagarin.mp3 differ diff --git a/src/console.cpp b/src/console.cpp index 6704931..e325004 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -54,7 +54,7 @@ void Console::task() { if(xQueueReceive(hQueue, &next_line, pdMS_TO_TICKS( 500 )) == pdTRUE) { // Output next line - if(active) { + if(active && font != nullptr && font->valid) { FantaManipulator * m = disp->manipulate(); if(m->lock()) { @@ -90,7 +90,7 @@ void Console::task() { cursor_state = false; } - if(cursor_enable && active) { + if(cursor_enable && active && font != nullptr && font->valid) { cursor_state = !cursor_state; FantaManipulator * m = disp->manipulate(); if(m->lock()) { @@ -107,6 +107,7 @@ void Console::clear() { } void Console::set_cursor(bool enable) { + if(font == nullptr || !font->valid) return; if(enable && !cursor_enable) { cursor_state = true; if(active) { @@ -129,6 +130,7 @@ void Console::set_cursor(bool enable) { } void Console::cursor_newline(FantaManipulator * m) { + if(font == nullptr || !font->valid) return; if(cursor_y + font->height * 2 > disp->height) { // Next line won't fit, so scroll current content above and keep Y same m->scroll(0, -font->height); diff --git a/src/graphics/font.cpp b/src/graphics/font.cpp index ab93cba..832f200 100644 --- a/src/graphics/font.cpp +++ b/src/graphics/font.cpp @@ -87,7 +87,7 @@ bool load_font_from_file_handle(FILE * f, font_definition_t * dest) { r = fread(&((uint8_t*) ranges)[total], 1, sect.size - total, f); total += r; } - + if(total != sect.size) { ESP_LOGE(LOG_TAG, "Underrun reading range table: expected %u bytes but got only %u", sect.size, total); free(ranges); @@ -95,6 +95,7 @@ bool load_font_from_file_handle(FILE * f, font_definition_t * dest) { } if(sect.magic == MONOFONT_MAGIC_RANGES_DEFL) { + ESP_LOGI(LOG_TAG, "Decompressing RngZ"); ranges = (font_range_t *) decompress_emplace(ranges, sect.size, sect.real_size); if(ranges == nullptr) return false; dest->range_count = (sect.real_size / sizeof(font_range_t)); @@ -123,6 +124,7 @@ bool load_font_from_file_handle(FILE * f, font_definition_t * dest) { uint8_t * bitmap = (uint8_t*) ps_malloc(sect.size); if(bitmap == nullptr) { ESP_LOGE(LOG_TAG, "OOM allocating bitmap table"); + free(ranges); return false; } @@ -140,6 +142,7 @@ bool load_font_from_file_handle(FILE * f, font_definition_t * dest) { } if(sect.magic == MONOFONT_MAGIC_BITMAP_DEFL) { + ESP_LOGI(LOG_TAG, "Decompressing BMPZ"); bitmap = (uint8_t*) decompress_emplace(bitmap, sect.size, sect.real_size); if(bitmap == nullptr) { free(ranges); @@ -294,7 +297,6 @@ const font_definition_t * find_font(font_style_t style, font_fallback_behavior_t // Stub, todo fallback and all if(!fonts_loaded && !did_try_loading_font) load_fonts(); did_try_loading_font = true; - if(!fonts_loaded) return nullptr; if(style == FONT_STYLE_UI_TEXT || style == FONT_STYLE_CLOCK_FACE_SMALL || style == FONT_STYLE_CONSOLE) { return &keyrus0808_font; @@ -419,6 +421,7 @@ void sprite_from_glyph(const font_definition_t* font, char16_t glyph, bool maske } unsigned int measure_string_width(const font_definition_t* f, const char* s, text_attributes_t attributes) { + if(f == nullptr || !f->valid) return 0; unsigned int rslt = 0; const char * tmp = s; while(iterate_utf8(&tmp)) { diff --git a/src/network/netmgr.cpp b/src/network/netmgr.cpp index 9977a39..9ec2b41 100644 --- a/src/network/netmgr.cpp +++ b/src/network/netmgr.cpp @@ -64,6 +64,7 @@ void NetworkManager::wifi_event(WiFiEvent_t ev) { } else { save_current_network(); } + ESP_LOGI(LOG_TAG, "RSSI: %i dB", rssi()); break; default: ESP_LOGI(LOG_TAG, "Unhandled event %i", ev); diff --git a/src/views/weather/daily_forecast.cpp b/src/views/weather/daily_forecast.cpp index 3752b38..e59ac9c 100644 --- a/src/views/weather/daily_forecast.cpp +++ b/src/views/weather/daily_forecast.cpp @@ -6,6 +6,8 @@ class DailyForecastView::Column: public Composite { public: Column() { + wants_clear_surface = true; + icon = new AniSpriteView(); icon->x_offset = 0; icon->width = 16; diff --git a/webroot/index.html b/webroot/index.html index 07b09a8..a34b0a7 100644 --- a/webroot/index.html +++ b/webroot/index.html @@ -1,11 +1,81 @@ -
This is an update server for PIS-OS.
-This is an update server for PIS-OS.
+ +build by akasaka, Apr 2024. Done on multiple breadboards with magnet wire. The original Orange Ticking Thing. Features: Plasma display (Morio Denki MD16101), motion sensor, light sensor.
+ + +WIP photos:
+ + +build by akasaka, Oct 2024. Uses uPIS-OS PCB rev1.0. Features: VFD display (112x16-GU7000), vibration speaker (Taptic Engine), motion sensor, light sensor, headpat.
+ + + +build by akasaka, Oct 2024. Main development machine, based around PCB rev1.0. Features: VFD display (140x16-GU7000), audio output port, motion sensor, light sensor, headpat.
+ +build by akasaka, Nov 2024. Based around PCB rev1.0. Features: LED display using shift registers, big sperker, light sensor.
+ + + +build by akasaka, Jul 2024. Breadboard + magnet wire. Features: OLED display (WS0010), audio output port, touchscreen (4 zones). Dismantled in Sep 2024.
+ + + +build by akasaka, Sep-Nov 2024, total of 4 units. Identical to the NORITAKE_GU112 above, but uses a cheaper WS0010 OLED display instead.
+ + + +