Merge pull request #169 from sensebox/fix/sds-queryMode

change sds from active to query mode
This commit is contained in:
Mario Pesch 2022-04-28 11:20:54 +02:00 committed by GitHub
commit 16c463508f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,11 +160,11 @@ Blockly.Arduino.sensebox_sensor_sds011 = function () {
Blockly.Arduino.definitions_["define_sds011"] =
"SdsDustSensor sds(" + serial_name + ");";
Blockly.Arduino.setupCode_["sds011_begin"] = "sds.begin();";
Blockly.Arduino.setupCode_["sds011_setActiveReporting"] =
"sds.setActiveReportingMode();";
Blockly.Arduino.setupCode_["sds011_setQueryReportingMode"] =
"sds.setQueryReportingMode();";
Blockly.Arduino.loopCodeOnce_[
"sds011_getData"
] = `PmResult pm = sds.readPm();`;
] = `PmResult pm = sds.queryPm();`;
var code = `pm.${dropdown_name}`;
return [code, Blockly.Arduino.ORDER_ATOMIC];
};