KDE Connect: Musik-Anzeige mit Uhr, Koppeln mehrerer Geraete
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
3907b07171
commit
f74d8c8c59
6 files changed
+976
-9
No files matched your search
@@ -25,6 +25,12 @@
|
||||
#define SCREEN_TIMEOUT_S 60 // backlight off after X s without touch (0 = never)
|
||||
#define TIMEZONE "CET-1CEST,M3.5.0,M10.5.0/3"
|
||||
|
||||
// ---- KDE Connect (Musik-Anzeige) ----
|
||||
#define KDE_CONNECT 1 // 0 = aus
|
||||
#define KDE_DEVICE_NAME "HomeBoard" // so erscheint das Display in KDE Connect (keine Sonderzeichen)
|
||||
#define MUSIC_KEEP_SCREEN_ON 1 // Display bleibt an, solange Musik laeuft
|
||||
#define MUSIC_HIDE_S 60 // Musik-Ansicht X s nach Pause/Stopp schliessen
|
||||
|
||||
// ---- Display / Touch (only change these if something is off) ----
|
||||
#define TFT_INVERT 0 // 1 if the colours look inverted
|
||||
#define TOUCH_X_MIN 200
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
// Minimal KDE Connect client: pairing + MPRIS (what is playing where).
|
||||
// Runs in its own FreeRTOS task; the functions below are safe to call from the UI loop.
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
struct NowPlaying {
|
||||
bool valid = false; // something is known (playing or paused)
|
||||
bool playing = false;
|
||||
char device[33] = "";
|
||||
char player[33] = "";
|
||||
char title[97] = "";
|
||||
char artist[65] = "";
|
||||
int32_t posMs = 0, lenMs = 0; // position at atMs (millis())
|
||||
uint32_t atMs = 0;
|
||||
uint32_t seq = 0; // changes whenever title/artist/state/device change
|
||||
};
|
||||
|
||||
void kdeStart(const char* deviceName);
|
||||
void kdeGetNowPlaying(NowPlaying& out);
|
||||
// Returns a non-zero id while a pairing request waits for an answer and copies the device name.
|
||||
uint32_t kdePairRequest(char* name, size_t n);
|
||||
void kdeAnswerPair(bool accept);
|
||||
// "PlayPause", "Next", "Previous" for the player shown in kdeGetNowPlaying.
|
||||
void kdeMediaAction(const char* action);
|
||||
// Number of paired devices currently connected.
|
||||
int kdeConnectedCount();
|
||||
@@ -26,6 +26,7 @@
|
||||
#define LV_FONT_MONTSERRAT_14 1
|
||||
#define LV_FONT_MONTSERRAT_20 1
|
||||
#define LV_FONT_MONTSERRAT_28 1
|
||||
#define LV_FONT_MONTSERRAT_48 1
|
||||
#define LV_FONT_DEFAULT &lv_font_montserrat_14
|
||||
|
||||
#define LV_USE_THEME_DEFAULT 1
|
||||
|
||||
Reference in new issue
Block a user