Made some changes, +1 is a workarround
This commit is contained in:
@ -21,11 +21,11 @@ public:
|
||||
{
|
||||
using namespace espgui;
|
||||
QRCode qrcode;
|
||||
const auto ver = get_qrver_from_strlen(m_msg);
|
||||
const auto ver = get_qrver_from_strlen(m_msg) + 1;
|
||||
uint8_t qrcodeBytes[qrcode_getBufferSize(ver)];
|
||||
qrcode_initText(&qrcode, qrcodeBytes, ver, ECC_MEDIUM, m_msg.data());
|
||||
|
||||
const uint8_t multiplier = (tft.width() - 18) / qrcode.size;
|
||||
const uint8_t multiplier = (tft.width() - 9) / qrcode.size;
|
||||
const uint8_t x_offset = (tft.width() - qrcode.size * multiplier) / 2;
|
||||
const uint8_t y_offset = (tft.height() - qrcode.size * multiplier) / 2;
|
||||
|
||||
|
@ -331,7 +331,7 @@ std::string get_wifi_security_string(wifi_auth_mode_t authMode)
|
||||
switch (authMode)
|
||||
{
|
||||
case WIFI_AUTH_OPEN:
|
||||
return "nopass";
|
||||
return "";
|
||||
case WIFI_AUTH_WEP:
|
||||
return "WEP";
|
||||
case WIFI_AUTH_WPA_PSK:
|
||||
@ -339,7 +339,7 @@ std::string get_wifi_security_string(wifi_auth_mode_t authMode)
|
||||
case WIFI_AUTH_WPA_WPA2_PSK:
|
||||
return "WPA";
|
||||
default:
|
||||
return "unknown";
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user