mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
minor changes to error messages
This commit is contained in:
@@ -73,6 +73,7 @@ class EMSESPDevicesForm extends Component<EMSESPDevicesFormProps, EMSESPDevicesF
|
|||||||
const { width, data } = this.props;
|
const { width, data } = this.props;
|
||||||
return (
|
return (
|
||||||
<TableContainer>
|
<TableContainer>
|
||||||
|
{!this.noData() && (
|
||||||
<Table size="small" padding={isWidthDown('xs', width!) ? "none" : "default"}>
|
<Table size="small" padding={isWidthDown('xs', width!) ? "none" : "default"}>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
@@ -109,11 +110,12 @@ class EMSESPDevicesForm extends Component<EMSESPDevicesFormProps, EMSESPDevicesF
|
|||||||
))}
|
))}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</Table>
|
||||||
|
)}
|
||||||
{this.noData() &&
|
{this.noData() &&
|
||||||
(
|
(
|
||||||
<Box bgcolor="error.main" color="error.contrastText" p={2} mt={2} mb={2}>
|
<Box bgcolor="error.main" color="error.contrastText" p={2} mt={2} mb={2}>
|
||||||
<Typography variant="body1">
|
<Typography variant="body1">
|
||||||
No EMS devices found.
|
No EMS devices found. Check connection and for Tx errors. Try forcing a scan.
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export const busStatus = ({ status }: EMSESPStatus) => {
|
|||||||
case busConnectionStatus.BUS_STATUS_CONNECTED:
|
case busConnectionStatus.BUS_STATUS_CONNECTED:
|
||||||
return "Connected";
|
return "Connected";
|
||||||
case busConnectionStatus.BUS_STATUS_TX_ERRORS:
|
case busConnectionStatus.BUS_STATUS_TX_ERRORS:
|
||||||
return "Tx not stable";
|
return "Tx Errors";
|
||||||
case busConnectionStatus.BUS_STATUS_OFFLINE:
|
case busConnectionStatus.BUS_STATUS_OFFLINE:
|
||||||
return "Disconnected";
|
return "Disconnected";
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ uint8_t EMSESP::bus_status() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Tx Failure rate > 5%
|
// Tx Failure rate > 5%
|
||||||
if (((txservice_.telegram_fail_count() * 100) / total_sent) >= 5) {
|
if (((txservice_.telegram_fail_count() * 100) / total_sent) > 5) {
|
||||||
return BUS_STATUS_TX_ERRORS;
|
return BUS_STATUS_TX_ERRORS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user