mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 05:36:37 +00:00
Fix frequency formatting
This commit is contained in:
parent
00bd0707ed
commit
33b62e3583
@ -10,7 +10,7 @@ ADC_MODE(ADC_VCC); // tftShowConfig measures the voltage on the pin
|
||||
|
||||
int8_t getPinName(int8_t pin);
|
||||
|
||||
void tftSetup(TFT_eSPI & tft, JsonObject settings)
|
||||
void tftSetup(TFT_eSPI & tft, const JsonObject & settings)
|
||||
{
|
||||
tftShowConfig(tft);
|
||||
}
|
||||
@ -67,17 +67,16 @@ void tftOffsetInfo(uint8_t pin, uint8_t x_offset, uint8_t y_offset)
|
||||
}
|
||||
}
|
||||
|
||||
void tftPinInfo(String pinfunction, int8_t pin)
|
||||
void tftPinInfo(const __FlashStringHelper * pinfunction, int8_t pin)
|
||||
{
|
||||
if(pin != -1) {
|
||||
Log.verbose(F("TFT: %s = D%i (GPIO %i)"), pinfunction.c_str(), getPinName(pin), pin);
|
||||
Log.verbose(F("TFT: %s = D%i (GPIO %i)"), pinfunction, getPinName(pin), pin);
|
||||
}
|
||||
}
|
||||
|
||||
void tftShowConfig(TFT_eSPI & tft)
|
||||
{
|
||||
setup_t tftSetup;
|
||||
// char buffer[128];
|
||||
tft.getSetup(tftSetup);
|
||||
|
||||
Log.verbose(F("TFT: TFT_eSPI ver = %s"), tftSetup.version.c_str());
|
||||
@ -164,10 +163,10 @@ void tftShowConfig(TFT_eSPI & tft)
|
||||
*/
|
||||
|
||||
if(tftSetup.serial == 1) {
|
||||
Log.verbose(F("TFT: Display SPI frequency = %2.1f MHz"), tftSetup.tft_spi_freq / 10.0);
|
||||
Log.verbose(F("TFT: Display SPI frequency = %4.1f MHz"), (float)tftSetup.tft_spi_freq / 10.0f);
|
||||
}
|
||||
if(tftSetup.pin_tch_cs != -1) {
|
||||
Log.verbose(F("TFT: Touch SPI frequency = %2.1f MHz"), tftSetup.tch_spi_freq / 10.0);
|
||||
Log.verbose(F("TFT: Touch SPI frequency = %4.1f MHz"), (float)tftSetup.tch_spi_freq / 10.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "TFT_eSPI.h"
|
||||
#include "ArduinoJson.h"
|
||||
|
||||
void tftSetup(TFT_eSPI & screen, JsonObject settings);
|
||||
void tftSetup(TFT_eSPI & screen, const JsonObject & settings);
|
||||
void tftLoop(void);
|
||||
void tftStop(void);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user