mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-15 09:10:38 -08:00
Fix graph scaling
This commit is contained in:
@@ -2739,7 +2739,7 @@ float MenuFunctions::calculateGraphScale(int16_t value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate the multiplier proportionally
|
// Calculate the multiplier proportionally
|
||||||
return (0.5 * GRAPH_VERT_LIM) / value;
|
return (0.75 * GRAPH_VERT_LIM) / value;
|
||||||
}
|
}
|
||||||
|
|
||||||
float MenuFunctions::graphScaleCheck(const int16_t array[TFT_WIDTH]) {
|
float MenuFunctions::graphScaleCheck(const int16_t array[TFT_WIDTH]) {
|
||||||
@@ -2766,7 +2766,7 @@ void MenuFunctions::drawMaxLine(int16_t value, uint16_t color) {
|
|||||||
display_obj.tft.setCursor(0, TFT_HEIGHT - (value * this->_graph_scale));
|
display_obj.tft.setCursor(0, TFT_HEIGHT - (value * this->_graph_scale));
|
||||||
display_obj.tft.setTextColor(color, TFT_BLACK);
|
display_obj.tft.setTextColor(color, TFT_BLACK);
|
||||||
display_obj.tft.setTextSize(1);
|
display_obj.tft.setTextSize(1);
|
||||||
display_obj.tft.println((String)value);
|
display_obj.tft.println((String)(value / BASE_MULTIPLIER));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MenuFunctions::drawGraph(int16_t *values) {
|
void MenuFunctions::drawGraph(int16_t *values) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
//#define MARAUDER_REV_FEATHER
|
//#define MARAUDER_REV_FEATHER
|
||||||
//// END BOARD TARGETS
|
//// END BOARD TARGETS
|
||||||
|
|
||||||
#define MARAUDER_VERSION "v1.4.3"
|
#define MARAUDER_VERSION "v1.4.4"
|
||||||
|
|
||||||
#define GRAPH_REFRESH 100
|
#define GRAPH_REFRESH 100
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user