Skip to content

Commit

Permalink
Release 4.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
widavies committed Mar 12, 2018
1 parent 6c79dd5 commit ec12b5b
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 13 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ android {
applicationId "com.cpjd.roblu"
minSdkVersion 19
targetSdkVersion 27
versionCode 52
versionName "4.4.0"
versionCode 53
versionName "4.4.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

javaCompileOptions {
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/com/cpjd/roblu/csv/csvSheets/MatchData.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.cpjd.roblu.models.REvent;
import com.cpjd.roblu.models.RForm;
import com.cpjd.roblu.models.RTeam;
import com.cpjd.roblu.models.metrics.RCalculation;
import com.cpjd.roblu.models.metrics.RFieldData;
import com.cpjd.roblu.models.metrics.RMetric;
import com.cpjd.roblu.models.metrics.RStopwatch;
Expand Down Expand Up @@ -46,6 +47,7 @@ public void generateSheet(XSSFSheet sheet, REvent event, RForm form, RTeam[] tea
for(RMetric metric : checkout.getTeam().getTabs().get(0).getMetrics()) {
if(shouldWriteMetric(checkout.getTeam(), metric)) {
if(metric instanceof RStopwatch) createCell(data, index + 2, ((RStopwatch) metric).getLapsString());
else if(metric instanceof RCalculation) createCell(data, index + 2, ((RCalculation) metric).getValue(checkout.getTeam().getTabs().get(0).getMetrics()));
else if(metric instanceof RFieldData) continue;
else createCell(data, index + 2, metric.toString());
}
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/com/cpjd/roblu/sync/qr/QrReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public void run() {

new SyncHelper(getApplicationContext(), event, SyncHelper.MODES.QR).mergeCheckout(checkout);

// Flag for upload
new IO(getApplicationContext()).savePendingCheckout(checkout);

Notify.notifyMerged(getApplicationContext(), event.getID(), checkout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public void run() {
// Expands the match code, NOTE: this doesn't remove the R or B tag
private String expandMatchName(String name) {
return name.replaceAll("QU", "Quarters ").replaceAll("Q", "Quals ")
.replaceAll("S", "Semis ").replaceAll("M", " Match ");
.replaceAll("S", "Semis ").replaceAll("M", " Match ").replaceAll("F", "Finals ");
}

}
2 changes: 1 addition & 1 deletion app/src/main/java/com/cpjd/roblu/ui/teams/TeamsView.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public boolean onQueryTextChange(String newText) {
settings.setUpdateLevel(Constants.VERSION);

AlertDialog.Builder builder = new AlertDialog.Builder(TeamsView.this)
.setTitle("Changelist for Version 4.4.0")
.setTitle("Changelist for Version 4.4.1")
.setMessage(Constants.UPDATE_MESSAGE)
.setPositiveButton("Rock on", new DialogInterface.OnClickListener() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.cpjd.roblu.models.RTab;
import com.cpjd.roblu.models.RTeam;
import com.cpjd.roblu.models.metrics.RBoolean;
import com.cpjd.roblu.models.metrics.RCalculation;
import com.cpjd.roblu.models.metrics.RCheckbox;
import com.cpjd.roblu.models.metrics.RChooser;
import com.cpjd.roblu.models.metrics.RCounter;
Expand Down Expand Up @@ -181,7 +182,9 @@ else if(method == PROCESS_METHOD.MATCHES) {
}
// RCounter type
else if(metric instanceof RCounter) {

double value = ((RCounter) metric).getValue();
if(i == 2) min = value;
// Overview stats will only consider modified items
if(metric.isModified()) {

Expand All @@ -196,9 +199,33 @@ else if(metric instanceof RCounter) {
// add raw data
rawData.append(friendlyCounter((RCounter)metric)).append(ending(i, team.getTabs()));
}
else if(metric instanceof RCalculation) {
try {
double value = Double.parseDouble(((RCalculation) metric).getValue(team.getTabs().get(i).getMetrics()));

if(i == 2) min = value;
// Overview stats will only consider modified items
if(metric.isModified()) {

/*
* Progressively calculate the min, max, and average values
*/
if(value < min) min = value;
if(value > max) max = value;
average += value / (double) numModified(team.getTabs(), ID);
relevance = average;
}
// add raw data
rawData.append(friendlyCounter((RCounter)metric)).append(ending(i, team.getTabs()));
} catch(Exception e) {
// eat it
}

}
// RSlider type
else if(metric instanceof RSlider) {
int value = ((RSlider) metric).getValue();
if(i == 2) min = value;
// Overview stats will only consider modified sliders
if(metric.isModified()) {
if(value < min) min = value;
Expand All @@ -212,6 +239,7 @@ else if(metric instanceof RSlider) {
// RStopwatch type
else if(metric instanceof RStopwatch) {
double value = ((RStopwatch) metric).getTime();
if(i == 2) min = value;
// Overview stats will only consider modified stopwatches
if(metric.isModified()) {
/*
Expand Down Expand Up @@ -272,7 +300,23 @@ else if(metric instanceof RChooser) {
// Field data
else if(metric instanceof RFieldData) {
// Find the sub metric
if(((RFieldData) metric).getData() != null) rawData.append(((RFieldData) metric).getData().get(inMatchTitle).get(0).toString()).append(ending(i, team.getTabs()));
if(((RFieldData) metric).getData() != null) rawData.append(((RFieldData) metric).getData().get(inMatchTitle).get(team.getTabs().get(i).isRedAlliance() ? 0 : 1).toString()).append(ending(i, team.getTabs()));
// Overview stats will only consider modified textfields
if(metric.isModified()) {
/*
* Progressively calculate the min, max, and average values
*/
try {
double value = Double.parseDouble(((RFieldData) metric).getData().get(inMatchTitle).get(team.getTabs().get(i).isRedAlliance() ? 0 : 1).toString());
if(i == 2) min = value;
if(value < min) min = value;
if(value > max) max = value;
average += value / (double) numModified(team.getTabs(), ID);
relevance = average;
} catch(Exception e) {
// eat it
}
}
}

/*
Expand All @@ -286,13 +330,23 @@ else if(metric instanceof RFieldData) {
StringBuilder overview = new StringBuilder();
if(metric instanceof RBoolean) overview.append("Boolean: ").append(metric.getTitle()).append(" is true in ").append(occurrences).append(" / ").append(team.getTabs().size() - 2).append(" matches");
else if(metric instanceof RCounter) overview.append("Counter: ").append(metric.getTitle()).append(" Average: ").append(Utils.round(average, 2)).append(" Min: ").append(min).append(" Max: ").append(max);
else if(metric instanceof RCalculation) overview.append("Calculation: ").append(metric.getTitle()).append(" Average: ").append(Utils.round(average, 2)).append(" Min: ").append(min).append(" Max: ").append(max);
else if(metric instanceof RSlider) overview.append("Slider: ").append(metric.getTitle()).append(" Average: ").append(Utils.round(average, 2)).append(" Min: ").append(min).append(" Max: ").append(max);
else if(metric instanceof RStopwatch) overview.append("Stopwatch: ").append(metric.getTitle()).append(" Average: ").append(Utils.round(average, 2)).append(" Min: ").append(min).append(" Max: ").append(max);
else if(metric instanceof RTextfield) overview.append("Textfield: ").append(metric.getTitle()).append(" Average chars: ").append(Utils.round(average, 2)).append(" Min: ").append(min).append(" Max: ").append(max);
else if(metric instanceof RGallery) overview.append("Gallery: ").append(metric.getTitle()).append(" Average images: ").append(Utils.round(average, 2)).append(" Min: ").append(min).append(" Max: ").append(max);
else if(metric instanceof RChooser) overview.append("Chooser: ").append(metric.getTitle());
else if(metric instanceof RCheckbox) overview.append("Checkbox: ").append(metric.getTitle());
else if(metric instanceof RFieldData) overview.append("Field data: ").append(inMatchTitle);
else if(metric instanceof RFieldData) {
overview.append("Field data: ").append(inMatchTitle);
try {
// this will fail if the value isn't a number
Double.parseDouble(((RFieldData) metric).getData().get(inMatchTitle).get(0).toString());
overview.append("\nAverage: ").append(Utils.round(average, 2)).append(" Min: ").append(min).append(" Max: ").append(max);
} catch(Exception e) {
// eat it
}
}

/*
* Now append the raw data as processed above
Expand Down
9 changes: 4 additions & 5 deletions app/src/main/java/com/cpjd/roblu/ui/tutorials/Tutorial.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@ protected void onCreate(Bundle savedInstanceState) {
tutorials = new ArrayList<>();
tutorials.add(new RTutorial("Text based", "View the Roblu text based tutorial", "https://docs.google.com/document/d/1DqpgKPdtfZDUc7Zu3MqdJHL59aB-ht8H1ZwllYlzMuc/edit?usp=sharing"));
tutorials.add(new RTutorial("The basics", "Roblu's mission, description of platforms, terms, etc.", "9j6ysvJJyQg"));
tutorials.add(new RTutorial("Events", "Learn how to create, manage, backup, organize, and export events", "KoylfzTBvKM"));
tutorials.add(new RTutorial("Events", "Learn how to create, manage, backup, organize, and export events", "6BLlLxltppk"));
tutorials.add(new RTutorial("Forms", "Learn how to create, manage, edit, organize, master form", "LpWvnavebNw"));
tutorials.add(new RTutorial("Scouting", "Learn how to scout with the RTeam model, sort, organize, search", "5ktHjyQq4XY"));
tutorials.add(new RTutorial("Roblu Cloud", "Learn how to use Roblu cloud to sync events between teammates, admin controls", "UqAVql6eps4"));
tutorials.add(new RTutorial("Bluetooth [Coming soon]", "Learn how to use setup Roblu's Bluetooth server for syncing events", ""));
tutorials.add(new RTutorial("MEGA-TUTORIAL [Coming soon]", "Feeling ambitious? Learn about everything in one video.", ""));
tutorials.add(new RTutorial("QR Codes", "Learn how to use QR code syncing", "RF4evYIlU04"));
tutorials.add(new RTutorial("CSV Exporting", "Learn about CSV exporting and defining your own CSV export schemes", "RF4evYIlU04"));
tutorials.add(new RTutorial("How to get Roblu Cloud for free", "Get Roblu Cloud for free", "dQw4w9WgXcQ"));
tutorials.add(new RTutorial("Roblu Devlogs", "For those interested in watching the development process", ""));

/*
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/java/com/cpjd/roblu/utils/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
public abstract class Constants {

public static final String SERVICE_ID = "com.cpjd.roblu.service";
public static final String RESTART_BROADCAST = "com.cpjd.roblu.service.RestartService";

public static final String UPDATE_MESSAGE = "-Bug fixes";
public static final String UPDATE_MESSAGE = "-Added field data metric\n-Master form can be backed up\nAdded manual match schedule importer\n-Bug fixes";

public static final int VERSION = 11; // used for updating the changelist

Expand Down

0 comments on commit ec12b5b

Please sign in to comment.