Skip to content

Commit

Permalink
patch: fix compilation issues
Browse files Browse the repository at this point in the history
- Install dependencies.
- Remove optional parameters in make call, they are not needed.

Changelog-Entry: crelay: fix compilation issues
Signed-By: Lisandro Pérez Meyer <[email protected]>
  • Loading branch information
perezmeyer committed Apr 16, 2024
1 parent 404587b commit 48251d6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/features/power/implementations/crelay/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ export class Crelay implements Power {
async setup(): Promise<void> {
// install craly tooling
try {
await execAsync('apk add make build-base');
await execAsync('cd /usr/app/ && git clone https://github.com/balena-io-hardware/crelay.git');
await execAsync('cd /usr/app/crelay/src && make [DRV_CONRAD=n] [DRV_SAINSMART=n] [DRV_HIDAPI=n] && make install');
await execAsync('cd /usr/app/crelay/src && make && make install');
await execAsync('cp /usr/app/crelay/src/crelay /usr/local/bin/crelay');

// this retrieves info about the relay being used, and its serial
let info = await execAsync(`crelay -i ${this.relayId}`);
console.log(`Crelay controlled relay being used for power, channel: ${this.relayId}.`);
Expand Down

0 comments on commit 48251d6

Please sign in to comment.