Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsw committed Jan 26, 2024
1 parent af741ef commit 0eceb28
Show file tree
Hide file tree
Showing 24 changed files with 3,250 additions and 3,055 deletions.
2 changes: 1 addition & 1 deletion examples/pdo/pdo_producer.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async function main(device) {
// Send the PDO
let count = 0;
const timer = setInterval(() => {
device.eds.setValue(0x2000, ++count);
device.setValue(0x2000, ++count);

if (count >= 3) {
// Cleanup
Expand Down
3 changes: 2 additions & 1 deletion examples/sync/sync_producer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const { Device } = require('../../index.js');
async function main(device) {
await new Promise((resolve) => {
// Send Sync messages with ID 0x80
device.eds.setSyncCobId(0x80, true);
device.eds.setSyncCobId(0x80);
device.eds.setSyncGenerationEnable(true);
device.eds.setSyncCyclePeriod(1e5); // Every 100 ms
device.eds.setSyncOverflow(3); // Overflow at 3
device.start();
Expand Down
3 changes: 2 additions & 1 deletion examples/time/time_consumer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ async function main(device) {
});

// Consume Time messages with ID 0x100.
device.eds.setTimeCobId(0x100, false, true);
device.eds.setTimeCobId(0x100);
device.eds.setTimeConsumerEnable(true);
device.start();
});
}
Expand Down
3 changes: 2 additions & 1 deletion examples/time/time_producer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const { Device } = require('../../index.js');
async function main(device) {
await new Promise((resolve) => {
// Send Time messages with ID 0x100.
device.eds.setTimeCobId(0x100, true, false);
device.eds.setTimeCobId(0x100);
device.eds.setTimeProducerEnable(true);
device.start();
device.time.write();
device.stop();
Expand Down
20 changes: 0 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"devDependencies": {
"chai": "^4.3.10",
"chai-as-promised": "^7.1.1",
"chai-bytes": "^0.1.2",
"docdash": "^2.0.2",
"eslint": "^8.55.0",
"eslint-plugin-import": "^2.29.1",
Expand Down
Loading

0 comments on commit 0eceb28

Please sign in to comment.