mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2026-01-26 03:05:00 -08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9fd032a698 | ||
|
|
97dce525a4 | ||
|
|
424aa61127 | ||
|
|
4c6a2b23c4 |
@@ -2734,12 +2734,15 @@ void MenuFunctions::setGraphScale(float scale) {
|
||||
}
|
||||
|
||||
float MenuFunctions::calculateGraphScale(int16_t value) {
|
||||
if (value < GRAPH_VERT_LIM) {
|
||||
return 1.0; // No scaling needed if the value is within the limit
|
||||
if ((value * this->_graph_scale < GRAPH_VERT_LIM) && (value * this->_graph_scale > GRAPH_VERT_LIM * 0.75)) {
|
||||
return this->_graph_scale; // No scaling needed if the value is within the limit
|
||||
}
|
||||
|
||||
if (value < GRAPH_VERT_LIM)
|
||||
return 1.0;
|
||||
|
||||
// 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]) {
|
||||
@@ -2766,7 +2769,7 @@ void MenuFunctions::drawMaxLine(int16_t value, uint16_t color) {
|
||||
display_obj.tft.setCursor(0, TFT_HEIGHT - (value * this->_graph_scale));
|
||||
display_obj.tft.setTextColor(color, TFT_BLACK);
|
||||
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) {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
//#define MARAUDER_REV_FEATHER
|
||||
//// END BOARD TARGETS
|
||||
|
||||
#define MARAUDER_VERSION "v1.4.3"
|
||||
#define MARAUDER_VERSION "v1.4.4"
|
||||
|
||||
#define GRAPH_REFRESH 100
|
||||
|
||||
|
||||
Reference in New Issue
Block a user