Skip to content

Commit

Permalink
change: double quotes to single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
rsporny committed Feb 3, 2018
1 parent 7be261e commit ffcb734
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var _ = require("underscore");
var rpio = require("rpio");
var _ = require('underscore');
var rpio = require('rpio');
var Service, Characteristic;

const STATE_DECREASING = 0;
Expand All @@ -10,16 +10,16 @@ module.exports = function(homebridge) {
Service = homebridge.hap.Service;
Characteristic = homebridge.hap.Characteristic;

homebridge.registerAccessory("homebridge-gpio-blinds", "Blinds", BlindsAccessory);
homebridge.registerAccessory('homebridge-gpio-blinds', 'Blinds', BlindsAccessory);
}

function BlindsAccessory(log, config) {
_.defaults(config, {activeLow: true});

this.log = log;
this.name = config['name'];
this.pinUp = config["pinUp"];
this.pinDown = config["pinDown"];
this.pinUp = config['pinUp'];
this.pinDown = config['pinDown'];
this.durationUp = config['durationUp'];
this.durationDown = config['durationDown'];
this.initialState = config['activeLow'] ? rpio.HIGH : rpio.LOW;
Expand All @@ -33,9 +33,9 @@ function BlindsAccessory(log, config) {

this.infoService = new Service.AccessoryInformation();
this.infoService
.setCharacteristic(Characteristic.Manufacturer, "Radoslaw Sporny")
.setCharacteristic(Characteristic.Model, "RaspberryPi GPIO Blinds")
.setCharacteristic(Characteristic.SerialNumber, "Version 1.0.0");
.setCharacteristic(Characteristic.Manufacturer, 'Radoslaw Sporny')
.setCharacteristic(Characteristic.Model, 'RaspberryPi GPIO Blinds')
.setCharacteristic(Characteristic.SerialNumber, 'Version 1.0.0');

// use gpio pin numbering
rpio.init({
Expand Down Expand Up @@ -77,13 +77,13 @@ BlindsAccessory.prototype.setTargetPosition = function(position, callback) {
this.log("Setting target position to %s", position);

if (this.positionState != STATE_STOPPED) {
this.log("Blinds are moving. You need to wait. I will do nothing.");
this.log('Blinds are moving. You need to wait. I will do nothing.');
callback();
return false;
}

if (this.currentPosition == position) {
this.log("Current position already matches target position. There is nothing to do.");
this.log('Current position already matches target position. There is nothing to do.');
callback();
return true;
}
Expand All @@ -98,7 +98,7 @@ BlindsAccessory.prototype.setTargetPosition = function(position, callback) {
}

this.log("Duration: %s ms", duration);
this.log(moveUp ? "Moving up" : "Moving down");
this.log(moveUp ? 'Moving up' : 'Moving down');

this.service.setCharacteristic(Characteristic.PositionState, (moveUp ? STATE_INCREASING : STATE_DECREASING));
this.positionState = (moveUp ? STATE_INCREASING : STATE_DECREASING);
Expand Down

0 comments on commit ffcb734

Please sign in to comment.