VGM/RPC: Rework custom colors, smoother config, better rainbow support (#53)

* first poc works

* rainbow mode now works over rpc

still not done refrash rate from flipper change and is slow so the rainbow mode doesnt look good

* transmit VgmMode

* use all the 32bit

* some config stuff

* sync apps

* Change protobuf repo

* Some lib naming changes and cleanup

* Format protobuf

* Update from RGB backlight if enabled

* Remove old expansion toggling

* Update settings UI

* Fix searching previous value

* VGM Tool: Add new RGB firmware

* Update changelog

* These are unused

---------

Co-authored-by: Willy-JL <49810075+Willy-JL@users.noreply.github.com>
This commit is contained in:
HaxSam
2024-06-02 07:41:47 +00:00
committed by GitHub
parent f17b19ed7d
commit 2319475dd0
17 changed files with 200 additions and 232 deletions

View File

@@ -1,6 +1,8 @@
#include "rpc_i.h"
#include <gui/gui_i.h>
#include <assets_icons.h>
#include <momentum/momentum.h>
#include <rgb_backlight.h>
#include <flipper.pb.h>
#include <gui.pb.h>
@@ -97,6 +99,34 @@ static void rpc_system_gui_screen_stream_frame_callback(
rpc_gui->transmit_frame->content.gui_screen_frame.orientation =
rpc_system_gui_screen_orientation_map[orientation];
if(momentum_settings.rpc_color_fg.mode == ScreenColorModeRgbBacklight) {
ScreenFrameColor fg_color;
if(rgb_backlight_get_rainbow_mode() == RGBBacklightRainbowModeOff) {
fg_color.mode = ScreenColorModeCustom;
rgb_backlight_get_color(0, &fg_color.rgb);
} else {
fg_color.mode = ScreenColorModeRainbow;
}
rpc_gui->transmit_frame->content.gui_screen_frame.fg_color = fg_color.value;
} else {
rpc_gui->transmit_frame->content.gui_screen_frame.fg_color =
momentum_settings.rpc_color_fg.value;
}
if(momentum_settings.rpc_color_bg.mode == ScreenColorModeRgbBacklight) {
ScreenFrameColor bg_color;
if(rgb_backlight_get_rainbow_mode() == RGBBacklightRainbowModeOff) {
bg_color.mode = ScreenColorModeCustom;
rgb_backlight_get_color(0, &bg_color.rgb);
} else {
bg_color.mode = ScreenColorModeRainbow;
}
rpc_gui->transmit_frame->content.gui_screen_frame.bg_color = bg_color.value;
} else {
rpc_gui->transmit_frame->content.gui_screen_frame.bg_color =
momentum_settings.rpc_color_bg.value;
}
furi_thread_flags_set(furi_thread_get_id(rpc_gui->transmit_thread), RpcGuiWorkerFlagTransmit);
}