mirror of
https://github.com/Team4388/RidgeScout.git
synced 2026-06-09 08:38:03 -06:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4554db9dc7 | |||
| b5b1100c2c | |||
| ef761003c8 |
@@ -41,7 +41,6 @@ public class ScoutingArray {
|
||||
continue;
|
||||
case CREATE:
|
||||
new_values[i] = create_transfer((CreateTransferType) tv);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
this.array = new_values;
|
||||
@@ -72,12 +71,6 @@ public class ScoutingArray {
|
||||
return get_data_type_by_UUID(tv.UUID);
|
||||
}
|
||||
|
||||
// private dataType rename_transfer(renameTransferType tv){
|
||||
// dataType dt = get_data_type_by_name(tv.name);
|
||||
// dt.name = tv.new_name;
|
||||
// return dt;
|
||||
// }
|
||||
|
||||
private RawDataType create_transfer(CreateTransferType tv){
|
||||
FieldType it = get_input_type_by_UUID(version+1, tv.UUID);
|
||||
switch (it.getValueType()){
|
||||
|
||||
@@ -32,12 +32,6 @@ public class ScoutingFile {
|
||||
ByteBuilder bb = new ByteBuilder()
|
||||
.addString(filename);
|
||||
|
||||
// byte[] data = Objects.requireNonNull(fileEditor.readFile(filename));
|
||||
|
||||
// for(int i = 0; i < data.length / 65535; i++){
|
||||
// bb.addRaw(255, fileEditor.getByteBlock(data, i*65535, (i+1)*65535));
|
||||
// }
|
||||
|
||||
bb.addRaw(255, Objects.requireNonNull(FileEditor.readFile(filename)));
|
||||
|
||||
return bb.build();
|
||||
|
||||
@@ -16,11 +16,14 @@ import java.util.stream.IntStream;
|
||||
// Class to contain data for an entire event.
|
||||
// Easily encoded and decoded to binary format.
|
||||
public class frcEvent {
|
||||
public String eventCode;
|
||||
|
||||
// public static final int typecode = 254; Unused, no idea what this is
|
||||
public String eventCode; //Current event code
|
||||
public String name;
|
||||
public ArrayList<frcMatch> matches;
|
||||
public ArrayList<frcTeam> teams;
|
||||
|
||||
// Turns frcEvent into raw data
|
||||
public byte[] encode() {
|
||||
try {
|
||||
ByteBuilder bb = new ByteBuilder()
|
||||
@@ -46,6 +49,7 @@ public class frcEvent {
|
||||
}
|
||||
}
|
||||
|
||||
//Decodes the frcEvent
|
||||
public static frcEvent decode(byte[] bytes) {
|
||||
try {
|
||||
ArrayList<BuiltByteParser.parsedObject> objects =
|
||||
@@ -74,6 +78,7 @@ public class frcEvent {
|
||||
}
|
||||
}
|
||||
|
||||
//Generates text
|
||||
@NonNull
|
||||
public String toString() {
|
||||
return (
|
||||
|
||||
@@ -207,6 +207,7 @@ public class CheckboxType extends FieldType {
|
||||
parent.addView(chart);
|
||||
}
|
||||
|
||||
//TODO
|
||||
public void addDataToTable(TableLayout parent, Map<Integer, List<RawDataType>> data){
|
||||
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public class DropdownType extends FieldType {
|
||||
|
||||
|
||||
|
||||
|
||||
// Dropdown view
|
||||
public void add_individual_view(LinearLayout parent, RawDataType data){
|
||||
if(data.isNull()) return;
|
||||
|
||||
@@ -122,7 +122,7 @@ public class DropdownType extends FieldType {
|
||||
|
||||
|
||||
|
||||
|
||||
// Generates N amount of colors, all opposite colors
|
||||
private static int[] generateEquidistantColors(int N) {
|
||||
int[] colors = new int[N];
|
||||
float[] hsv = new float[3]; // Hue, Saturation, Value
|
||||
@@ -138,6 +138,7 @@ public class DropdownType extends FieldType {
|
||||
return colors;
|
||||
}
|
||||
|
||||
// Turns the dropdown into a pie chart in the compiled view
|
||||
public void add_compiled_view(LinearLayout parent, RawDataType[] data){
|
||||
PieChart chart = new PieChart(parent.getContext());
|
||||
FrameLayout.LayoutParams layout = new FrameLayout.LayoutParams(
|
||||
@@ -171,7 +172,7 @@ public class DropdownType extends FieldType {
|
||||
|
||||
|
||||
|
||||
|
||||
// Turns the dropdown into a line chart in the history view
|
||||
public void add_history_view(LinearLayout parent, RawDataType[] data){
|
||||
LineChart chart = new LineChart(parent.getContext());
|
||||
FrameLayout.LayoutParams layout = new FrameLayout.LayoutParams(
|
||||
@@ -238,6 +239,7 @@ public class DropdownType extends FieldType {
|
||||
parent.addView(chart);
|
||||
}
|
||||
|
||||
//TODO
|
||||
public void addDataToTable(TableLayout parent, Map<Integer, List<RawDataType>> data){
|
||||
|
||||
}
|
||||
|
||||
@@ -221,6 +221,7 @@ public class FieldposType extends FieldType {
|
||||
parent.addView(chart);
|
||||
}
|
||||
|
||||
//TODO
|
||||
public void addDataToTable(TableLayout parent, Map<Integer, List<RawDataType>> data){
|
||||
|
||||
}
|
||||
|
||||
@@ -312,6 +312,7 @@ public class NumberType extends FieldType {
|
||||
parent.addView(chart);
|
||||
}
|
||||
|
||||
//TODO
|
||||
public void addDataToTable(TableLayout parent, Map<Integer, List<RawDataType>> data){
|
||||
|
||||
}
|
||||
|
||||
@@ -220,6 +220,7 @@ public class TextType extends FieldType {
|
||||
|
||||
}
|
||||
|
||||
//TODO
|
||||
public void addDataToTable(TableLayout parent, Map<Integer, List<RawDataType>> data){
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user