Skip to content

Commit

Permalink
logger fix
Browse files Browse the repository at this point in the history
  • Loading branch information
1198159 committed Oct 3, 2020
1 parent 3013a8b commit e4cc069
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public boolean getAsBoolean() {

public boolean getToggle(){
boolean r = false;
if(uponPressTogglePress() ){
if(uponPressTogglePress()){
r = togglePress;
togglePress = !togglePress;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class Logger {
public ArrayList<Entry> unindexedEntries;
public Telemetry telemetry;
public Object root;
public int total = 0, max = 0;
public int total = 0, max = -1;

public Logger(Telemetry tel, Object r) {
root = r;
Expand All @@ -37,7 +37,7 @@ private void mergeEntries() {
entries[i] = unindexedEntries.remove(0);
}
}
entries = Arrays.copyOfRange(entries, 0, Math.max(total, max+1));
entries = Arrays.copyOfRange(entries, 0, Math.max(total, max));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public OpModeState getOpModeState() {
@Override
public final void runOpMode() throws InterruptedException {
HardwareDevice.hardwareMap = hardwareMap;
logger = new Logger(telemetry, hardwareMap);
logger = new Logger(telemetry, this);
beginInit();
while (!isStarted()) {
beginLoop();
Expand Down

0 comments on commit e4cc069

Please sign in to comment.