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

jacdac-ts

Package Overview
Dependencies
Maintainers
1
Versions
497
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jacdac-ts - npm Package Compare versions

Comparing version 1.33.2 to 1.33.3

4

dist/types/src/jdom/ledcontroller.d.ts

@@ -8,2 +8,3 @@ import { JDEventSource } from "./eventsource";

private _color;
private _announces;
constructor(service: JDService, command: number);

@@ -13,4 +14,5 @@ get color(): number;

blink(from: number, to: number, interval: number, repeat: number): Promise<void>;
handlePacket(pkt: Packet): void;
processAnnouncement(): void;
processPacket(pkt: Packet): void;
}
//# sourceMappingURL=ledcontroller.d.ts.map
{
"name": "jacdac-ts",
"version": "1.33.2",
"version": "1.33.3",
"description": "JavaScript/TypeScript library to interact with Jacdac devices",

@@ -5,0 +5,0 @@ "keywords": [

@@ -775,2 +775,5 @@ import { Packet } from "./packet"

}
// update status led
this.statusLight?.processAnnouncement()
}

@@ -855,3 +858,3 @@

)
pkt.device.statusLight?.handlePacket(pkt)
pkt.device.statusLight?.processPacket(pkt)
}

@@ -858,0 +861,0 @@

@@ -18,2 +18,3 @@ import { CHANGE, ControlCmdPack } from "./constants"

private _color: number
private _announces = 0

@@ -34,2 +35,4 @@ constructor(

this._color = color
this._announces = 0
if (this._color !== undefined) {

@@ -56,3 +59,14 @@ const data = jdpack(

handlePacket(pkt: Packet) {
processAnnouncement() {
if (this._color === undefined) return
this._announces++
if (this._announces > 2) {
// jacdac will blink at least once per announce cycle
this._color = undefined
this._announces = 0
this.emit(CHANGE)
}
}
processPacket(pkt: Packet) {
const [toRed, toGreen, toBlue] = jdunpack<

@@ -59,0 +73,0 @@ [number, number, number, number]

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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