Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@caseywebb/growhaus

Package Overview
Dependencies
Maintainers
1
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@caseywebb/growhaus - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

### [1.1.1](https://github.com/caseyWebb/growhaus/compare/v1.1.0...v1.1.1) (2020-05-05)
## [1.1.0](https://github.com/caseyWebb/growhaus/compare/v0.0.1...v1.1.0) (2020-05-05)

@@ -7,0 +9,0 @@

2

dist/driver.d.ts

@@ -7,3 +7,3 @@ import { LedOption } from 'pi-io';

constructor();
setBrightness(percentage: number): Promise<void>;
setBrightness(intensity: number): Promise<void>;
}

@@ -10,0 +10,0 @@ export declare const driver: LedDriver;

@@ -24,10 +24,10 @@ "use strict";

}
async setBrightness(percentage) {
async setBrightness(intensity) {
await this.ready;
percentage = Math.min(Math.max(percentage, 0), 100);
logger_1.log(`Setting brightness to ${percentage}%`);
intensity = Math.min(Math.max(intensity, 0), 255);
logger_1.log(`Setting brightness to ${intensity}`);
this.led.on();
this.led.brightness(255 - Math.round((percentage / 100) * 255));
this.led.brightness(255 - intensity);
}
}
exports.driver = new LedDriver();

@@ -28,10 +28,10 @@ "use strict";

if (nowH > peakBegin && nowH < peakEnd)
return 100;
return 255;
const transitionPeriodLengthInMinutes = (nowH < 12 ? peakBegin - dayBegin : dayEnd - peakEnd) * 60;
const transitionPeriodProgressInMinutes = (nowH - (nowH < 12 ? dayBegin : peakEnd)) * 60 + nowM;
const progress = Math.round((100 * transitionPeriodProgressInMinutes) /
const progress = Math.round((255 * transitionPeriodProgressInMinutes) /
transitionPeriodLengthInMinutes);
return nowH > 12 ? 100 - progress : progress;
return nowH > 12 ? 255 - progress : progress;
}
}
exports.LightSchedule = LightSchedule;
{
"name": "@caseywebb/growhaus",
"version": "1.1.0",
"version": "1.1.1",
"license": "WTFPL",

@@ -5,0 +5,0 @@ "bin": "./bin/growhaus",

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