RumPi Linux Client 1.0
A wxWidgets desktop dashboard that visualizes a RumPi robot's live sensor data as a condition-reactive scene
ClientUtilities.h
Go to the documentation of this file.
1#pragma once
2
3#include <wx/string.h>
4
13{
14public:
30 static unsigned char AlphaByte(double alpha);
31
50 static wxString FormatReading(float value, const char* utf8Unit, int decimals = 1);
51};
Collects small, general-purpose helpers shared across the client UI.
Definition: ClientUtilities.h:13
static unsigned char AlphaByte(double alpha)
Converts a 0.0 - 1.0 opacity to a wxColour alpha byte, clamped so an out-of-range value never overflo...
Definition: ClientUtilities.cpp:20
static wxString FormatReading(float value, const char *utf8Unit, int decimals=1)
Formats a numeric sensor reading with its unit, or "N/A" for the NaN "no reading / sensor absent" sen...
Definition: ClientUtilities.cpp:43