Skip to content

Commit

Permalink
non blocking send on can
Browse files Browse the repository at this point in the history
  • Loading branch information
milesstoetzner committed Sep 24, 2023
1 parent bcc68b0 commit 913c102
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/bus/can.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class CANBus extends Bus {
std.log('starting can bus', {options: this.options})
await actions.vcan.start({name: this.options.name})

this.channel = can.createRawChannel(this.options.name)
this.channel = can.createRawChannelWithOptions(this.options.name, {non_block_send: true})
this.channel.addListener('onMessage', function (message: CANMessage) {
std.log('can bus received', {message: Message.fromCAN(message).toJSON()})
})
Expand Down
2 changes: 1 addition & 1 deletion src/target/can.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class CANTarget extends Target {

async start() {
std.log('starting can target', {options: this.options})
this.target = can.createRawChannel(this.options.name)
this.target = can.createRawChannelWithOptions(this.options.name, {non_block_send: true})
// TODO: does this have a site-effect on the os?
this.target.start()

Expand Down
2 changes: 1 addition & 1 deletion tests/bridge/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function createBidirectionalBridgeTest(
await files.createFile(output)

// Receives "request" and returns "answer"
const receiver = can.createRawChannel(cans[1])
const receiver = can.createRawChannelWithOptions(cans[1], {non_block_send: true})
receiver.addListener('onMessage', function (message: CANMessage) {
std.log('receiver received', {message})

Expand Down

0 comments on commit 913c102

Please sign in to comment.