mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
added settings manager variablers
This commit is contained in:
@@ -1,7 +1,36 @@
|
||||
package Classes;
|
||||
|
||||
import Classes.MetaClass.Singleton;
|
||||
import Objects.*;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class SettingsManager extends Singleton {
|
||||
public static int x = 5; // example of how to setup variable in singleton
|
||||
public static HashMap cams = new HashMap();
|
||||
public static HashMap UsbCameras = new HashMap();
|
||||
public static HashMap USBCamerasInfo = new HashMap();
|
||||
public static DefaultGeneralSettings GeneralSettings;
|
||||
public static HashMap CameraPort = new HashMap();
|
||||
public static HashMap CamerasCurrentPipeline = new HashMap();
|
||||
public SettingsManager(){
|
||||
InitiateGeneralSettings();
|
||||
InitiateCamerasInfo();
|
||||
InitiateUsbCameras();
|
||||
InitiateUsbCamerasSettings();
|
||||
}
|
||||
|
||||
private void InitiateGeneralSettings(){
|
||||
|
||||
}
|
||||
private void InitiateCamerasInfo(){
|
||||
|
||||
}
|
||||
private void InitiateUsbCameras(){
|
||||
|
||||
}
|
||||
private void InitiateUsbCamerasSettings(){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import Classes.SettingsManager;
|
||||
import Handlers.Web.Server;
|
||||
public class Main {
|
||||
public static void main(String [] args) {
|
||||
SettingsManager Manager = new SettingsManager();
|
||||
Server.main(8888);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
14
Main/src/main/java/Objects/DefaultGeneralSettings.java
Normal file
14
Main/src/main/java/Objects/DefaultGeneralSettings.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package Objects;
|
||||
|
||||
public class DefaultGeneralSettings {
|
||||
public int team_number = 1577;
|
||||
public String connection_type = "DHCP";
|
||||
public String ip = "";
|
||||
public String gateway = "";
|
||||
public String netmask = "";
|
||||
public String hostname = "Chameleon-Vision";
|
||||
public String curr_camera = "";
|
||||
public String curr_pipeline = "";
|
||||
|
||||
|
||||
}
|
||||
22
Main/src/main/java/Objects/DefaultPipeline.java
Normal file
22
Main/src/main/java/Objects/DefaultPipeline.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class DefaultPipeline {
|
||||
public int exposure = 50;
|
||||
public int brightness = 50;
|
||||
public String orientation = "Normal";
|
||||
public List<Integer> hue = Arrays.asList(0,100);
|
||||
public List<Integer> saturation = Arrays.asList(0,100);
|
||||
public List<Integer> value = Arrays.asList(0,100);
|
||||
public boolean erode = false;
|
||||
public boolean dilate = false;
|
||||
public List<Integer> area = Arrays.asList(0,100);
|
||||
public List<Integer> ratio = Arrays.asList(0,20);
|
||||
public List<Integer> extent = Arrays.asList(0,100);
|
||||
public boolean is_binary = false;
|
||||
public String sort_mode = "Largest";
|
||||
public String target_intersection = "Largest";
|
||||
public double M = 1;
|
||||
public double B = 0;
|
||||
}
|
||||
Reference in New Issue
Block a user