more linting

This commit is contained in:
Dave Conway-Jones
2025-08-26 19:17:13 +01:00
parent b059935610
commit a76f435355
2 changed files with 2 additions and 6 deletions

View File

@@ -17,10 +17,6 @@
var should = require("should"); var should = require("should");
var helper = require("node-red-node-test-helper"); var helper = require("node-red-node-test-helper");
var rpiNode = require('../../../hardware/PiGpio/36-rpi-gpio.js'); var rpiNode = require('../../../hardware/PiGpio/36-rpi-gpio.js');
//var rpiNode = require("nr-test-utils").require("@node-red/nodes/core/hardware/36-rpi-gpio.js");
//var statusNode = require("nr-test-utils").require("@node-red/nodes/core/core/25-status.js");
var helper = require("node-red-node-test-helper");
var fs = require("fs"); var fs = require("fs");
describe('RPI GPIO Node', function() { describe('RPI GPIO Node', function() {

View File

@@ -217,13 +217,13 @@ module.exports = function (RED) {
} }
// if the chronological order is NOW --> ON --> OFF, then now should be OFF // if the chronological order is NOW --> ON --> OFF, then now should be OFF
if (proceed && selectedOffTime.isAfter(selectedOnTime)) { if (selectedOffTime.isAfter(selectedOnTime)) {
sendPayload(0, selectedOnTime); sendPayload(0, selectedOnTime);
return; return;
} }
// if the chronological order is NOW --> OFF --> ON, then now should be ON // if the chronological order is NOW --> OFF --> ON, then now should be ON
if (proceed && selectedOffTime.isBefore(selectedOnTime)) { if (selectedOffTime.isBefore(selectedOnTime)) {
sendPayload(1, selectedOffTime); sendPayload(1, selectedOffTime);
return; return;
} }