New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rfcontroljs

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rfcontroljs - npm Package Compare versions

Comparing version 0.0.13 to 0.0.14

lib/protocols/weather4.js

2

lib/controller.js

@@ -6,3 +6,3 @@ var doesProtocolMatch, helper, protocols, sortIndices,

protocols = ['weather1', 'weather2', 'weather3', 'switch1', 'switch2', 'switch3', 'switch4', "switch5", 'pir1', 'contact1', 'generic'];
protocols = ['weather1', 'weather2', 'weather3', 'weather4', 'switch1', 'switch2', 'switch3', 'switch4', "switch5", 'pir1', 'contact1', 'generic'];

@@ -9,0 +9,0 @@ protocols = protocols.map((function(_this) {

@@ -54,2 +54,5 @@ module.exports = function(helper) {

})());
if (all) {
state = !state;
}
return result = {

@@ -63,18 +66,24 @@ id: id,

encodeMessage: function(message) {
var id, inverseState, unitCode;
var id, inverseState, state, unitCode;
id = helper.map(helper.numberToBinary(message.id, 20), binaryToPulse);
unitCode = ((function() {
switch (message.unit) {
case 1:
return 0;
case 2:
return 1;
case 3:
return 2;
case 4:
return 4;
}
})());
if (message.all) {
unitCode = (message.state ? 6 : 7);
state = !message.state;
} else {
unitCode = ((function() {
switch (message.unit) {
case 1:
return 0;
case 2:
return 1;
case 3:
return 2;
case 4:
return 4;
}
})());
state = message.state;
}
unitCode = helper.map(helper.numberToBinary(unitCode, 3), binaryToPulse);
inverseState = (message.state ? binaryToPulse['0'] : binaryToPulse['1']);
inverseState = (state ? binaryToPulse['0'] : binaryToPulse['1']);
return "" + id + unitCode + inverseState + "02";

@@ -81,0 +90,0 @@ }

{
"name": "rfcontroljs",
"version": "0.0.13",
"version": "0.0.14",
"description": "Protocol support for different 433mhz switches and weather stations for the RFControl Arduino library",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc