Skip to content

Commit

Permalink
Linted
Browse files Browse the repository at this point in the history
  • Loading branch information
fchorney committed May 16, 2024
1 parent 2801066 commit b40467d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
3 changes: 1 addition & 2 deletions sdk/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ export enum PanelTestMode {
Off = 48,
/** 49 represents the char "1" **/
PressureTest = 49,
};

}

export const SMX_USB_VENDOR_ID = 0x2341;
export const SMX_USB_PRODUCT_ID = 0x8037;
Expand Down
18 changes: 8 additions & 10 deletions sdk/smx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ export class SMXStage {
this.events.output$.push(Uint8Array.of(API_COMMAND.GET_SENSOR_TEST_DATA, this.test_mode));
return this.testDataResponse$.firstToPromise();
}
/*

/*
void SMX::SMXManager::UpdatePanelTestMode()
{
// If the test mode has changed, send the new test mode.
Expand Down Expand Up @@ -280,13 +280,13 @@ void SMX::SMXManager::UpdatePanelTestMode()
// Turn off panel test mode, and send "Off" event
this.panelTestMode = mode;
this.events.output$.push(Uint8Array.of(API_COMMAND.SET_PANEL_TEST_MODE, mode));

// TODO: Do we need to do anything with this? Does this even need to be called to flush
// the queue?
this.events.ackReports$.firstToPromise();
}

// Either we're already off, or we sent the off command, so just return.
// Either we're already off, or we sent the off command, so just return.
return;
}

Expand All @@ -300,12 +300,10 @@ void SMX::SMXManager::UpdatePanelTestMode()
* Lights are always updated together (for some reason??)
* 2 pads * 9 panels * 25 lights each * 3 (RGB) = 1350
* The source code uses `108` and I'm really unsure why
*
*
* TODO: Does this even do anything?
*/
this.events.output$.push(
Uint8Array.of(API_COMMAND.SET_LIGHTS_OLD, ...padData([], 1350, 0), char2byte('\n'))
);
*/
this.events.output$.push(Uint8Array.of(API_COMMAND.SET_LIGHTS_OLD, ...padData([], 1350, 0), char2byte("\n")));

// TODO: Do we need to do anything with this? Does this even need to be called to flush
// the queue?
Expand All @@ -320,7 +318,7 @@ void SMX::SMXManager::UpdatePanelTestMode()

// The Panel Test Mode command needs to be resent every second
this.testModeIntervalHandle = setInterval(() => {
this.events.output$.push(Uint8Array.of(API_COMMAND.SET_PANEL_TEST_MODE, mode));
this.events.output$.push(Uint8Array.of(API_COMMAND.SET_PANEL_TEST_MODE, mode));

// TODO: Do I need to call this to consume the event?
this.events.ackReports$.firstToPromise();
Expand Down

0 comments on commit b40467d

Please sign in to comment.