update
This commit is contained in:
@@ -101,7 +101,7 @@ function getNPM_values(port){
|
||||
|
||||
$("#loading_"+port).hide();
|
||||
// Create an array of the desired keys
|
||||
const keysToShow = ["PM1", "PM25", "PM10"];
|
||||
const keysToShow = ["PM1", "PM25", "PM10","message"];
|
||||
// Error messages mapping
|
||||
const errorMessages = {
|
||||
"notReady": "Sensor is not ready",
|
||||
@@ -307,8 +307,8 @@ error: function(xhr, status, error) {
|
||||
|
||||
const container = document.getElementById('card-container'); // Conteneur des cartes
|
||||
|
||||
//creates NPM card
|
||||
if (response["NPM/get_data_modbus_v3.py"]) {
|
||||
//creates NPM card (by default)
|
||||
|
||||
const cardHTML = `
|
||||
<div class="col-sm-3">
|
||||
<div class="card">
|
||||
@@ -329,7 +329,7 @@ error: function(xhr, status, error) {
|
||||
</div>`;
|
||||
|
||||
container.innerHTML += cardHTML; // Add the I2C card if condition is met
|
||||
}
|
||||
|
||||
|
||||
//creates i2c BME280 card
|
||||
if (response["BME280/get_data_v2.py"]) {
|
||||
|
||||
Reference in New Issue
Block a user