Skip to content

Syntax error sending Preset Recall to Prisual Camera #5

@br8kpoint

Description

@br8kpoint

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions