Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax error sending Preset Recall to Prisual Camera #5

Open
br8kpoint opened this issue Jul 22, 2022 · 0 comments
Open

Syntax error sending Preset Recall to Prisual Camera #5

br8kpoint opened this issue Jul 22, 2022 · 0 comments

Comments

@br8kpoint
Copy link

When testing the library with a Prisual 20x Camera using UDP Visca I am receiving a syntax error sending the Preset Recall command and Preset Set Commands.

Here is the code

import { Camera } from "../src/visca/visca";
import { ViscaController,ViscaCameraConfig, ViscaControllerConfig,ViscaCommand } from "../src/visca/visca";

let config = {
    viscaSerial:{port:"COM7",baud:9600},
    //viscaIPCameras: [],
    viscaServer:{basePort: 52381,}
}
let ipConfig = {
    
} as ViscaCameraConfig;
let viscaConfig = config as ViscaControllerConfig;
viscaConfig.viscaSerial.baud = 9600;
viscaConfig.viscaSerial.port = "COM7";
ipConfig.id = 1;
ipConfig.ip = "192.168.100.88";
ipConfig.name= "Test";
ipConfig.port=1259;
const controller = new ViscaController(viscaConfig);
let cam1 = controller.addIPCamera(ipConfig);
cam1.on('update',()=>{
    console.log('cam 1 updated:');
    console.log(JSON.stringify(cam1));
});
let cmd = ViscaCommand.cmdCameraPresetRecall(1,1);
console.log(JSON.stringify(cmd));
cmd = ViscaCommand.cmdCameraPresetSet(1,1);
console.log(JSON.stringify(cmd));
cmd.onError = function(err){
    console.log(`preset error: ${err}`);
};
cam1.sendCommand(cmd);
console.log("started")


Attached is the log output.
node-visca.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant