GPIO checked for Raspberry Pi 5B

This commit is contained in:
2024-12-03 15:22:44 +07:00
parent f2d560049f
commit ea891d2744
3 changed files with 13 additions and 1 deletions

7
Html/html/public/js/socket.io.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -24,12 +24,14 @@ public class PanTiltController {
if (comports.length>0){
for (SerialPort port : comports){
Logger.info("Available Serial Port : {}", port.getSystemPortName());
if (port.getSystemPortName().equals(portname)){
if (portname.contains(port.getSystemPortName())){
Logger.info("Serial Port {} found", portname);
serialPort = port;
break;
}
}
if (serialPort!=null){
serialPort.setBaudRate(baudrate);

View File

@@ -409,10 +409,12 @@ public class Main {
// ZOOM Related Commands
case "GET MAX ZOOM":
if (vapixProtocol!=null){
Blink(LedIpCamera);
return new WebsocketReply("GET MAX ZOOM", String.valueOf(vapixProtocol.GetPTZMaxZoom()));
} else return new WebsocketReply("GET MAX ZOOM", "VapixProtocol not initialized");
case "GET ZOOM":
if (vapixProtocol!=null){
Blink(LedIpCamera);
return new WebsocketReply("GET ZOOM", String.valueOf(vapixProtocol.GetCurrentZoomValue()));
} else return new WebsocketReply("GET ZOOM", "VapixProtocol not initialized");
case "SET ZOOM":
@@ -438,6 +440,7 @@ public class Main {
case "GET RESOLUTION":
if (vapixProtocol!=null){
int[] res = vapixProtocol.GetCurrentResolution(1);
Blink(LedIpCamera);
return new WebsocketReply("GET RESOLUTION", String.format("%dx%d", res[0], res[1]));
} else return new WebsocketReply("GET RESOLUTION", "VapixProtocol not initialized");
case "GET AUDIOFILES":