вывод нормальной ошибки от сервера + фикс установки режима работы передатчика
This commit is contained in:
@@ -651,7 +651,7 @@ static const char* boolAsStr(bool value) {
|
||||
return value ? "true" : "false";
|
||||
}
|
||||
|
||||
static std::string buildEscapedString(const std::string& source) {
|
||||
std::string api_driver::buildEscapedString(const std::string& source) {
|
||||
std::string str(source);
|
||||
size_t start_pos = 0;
|
||||
while((start_pos = str.find('\"', start_pos)) != std::string::npos) {
|
||||
@@ -661,7 +661,7 @@ static std::string buildEscapedString(const std::string& source) {
|
||||
return "\"" + str + "\"";
|
||||
}
|
||||
|
||||
void writeDouble(std::ostream& out, double value, int prec = 2) {
|
||||
static void writeDouble(std::ostream& out, double value, int prec = 2) {
|
||||
if (std::isnan(value) || std::isinf(value)) {
|
||||
out << "\"nan\"";
|
||||
} else {
|
||||
@@ -873,7 +873,7 @@ std::string api_driver::ApiDriver::loadSettings() const {
|
||||
std::stringstream result;
|
||||
result << "{\n\"txAutoStart\":" << boolAsStr(modSettings.is_save_current_state);
|
||||
#ifdef MODEM_IS_SCPC
|
||||
result << ",\"txEn\":" << boolAsStr(!modSettings.tx_is_on);
|
||||
result << ",\"txEn\":" << boolAsStr(modSettings.tx_is_on);
|
||||
result << ",\"txModulatorIsTest\":" << boolAsStr(!modSettings.is_carrier);
|
||||
#endif
|
||||
result << ",\"txIsTestInput\":" << boolAsStr(modSettings.is_test_data);
|
||||
|
Reference in New Issue
Block a user