-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* begging of standardizing controllers * introduce CarControllerBase and move common files from nxt variants into main * fix the copyright headers * revert some signatures * format licenses * update copyright template a little * revert the return value type * refactor a little * move common res/values-ja/strings to main * rename NxtController to NxtCarController * refactor values*/strings * apply res/strings changes * rename constants * use static import * add methods of output devices and make all the base class's methods throw UnsupportedOperationException * fix a test a little * add helper methods that return the list of input/output devices. * reflect amiq11's comment * move defaults into the threshold setting fragment for each variant * rename variables a little * applied some yusaku's comments * add 'machine' package for controllers and machine providers * update packages in a file * improve comments/javadocs * fix minor bugs * move all the resources related to main from nxt variant * clean up codes * clean up javadocs * clean up javadocs a little * fix a bug that prevents the app from showing help images * use myusak's suggestion
- Loading branch information
Showing
79 changed files
with
968 additions
and
702 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,10 +24,7 @@ | |
import com.yahoo.squidb.sql.Table; | ||
|
||
/** | ||
* Implementation of SquidDatabase for this app. | ||
* | ||
* @author <a href="mailto:[email protected]">Tatsuya Iwanari</a> | ||
* @version 1.0 3-April-2016 | ||
* The implementation of SquidDatabase for this app. | ||
*/ | ||
public class DriveDatabase extends SquidDatabase { | ||
private static final int VERSION = 1; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,14 +30,11 @@ | |
import java.util.Collections; | ||
|
||
/** | ||
* Program Data manager | ||
* | ||
* @author <a href="mailto:[email protected]">Tatsuya Iwanari</a> | ||
* @version 2.0 2-April-2016 | ||
* A manger of {@link ProgramData}. | ||
*/ | ||
public class ProgramDataManager { | ||
private static ProgramDataManager mInstance = new ProgramDataManager(); | ||
private DriveDatabase mDriveDatabase = null; | ||
private DriveDatabase mDriveDatabase; | ||
|
||
// the number of execution programs should be less than or equals to 1 | ||
private static final Query EXECUTION_PROGRAM = | ||
|
@@ -71,29 +68,29 @@ public static ProgramDataManager getInstance() { | |
} | ||
|
||
/** | ||
* Save program data temporarily to execute it | ||
* Saves a program temporarily to execute it. | ||
* | ||
* @param BlockSpaceLayout The programming space that has blocks | ||
* @param layout The programming space that has blocks | ||
*/ | ||
public boolean saveExecutionProgram(BlockSpaceLayout layout) { | ||
return saveProgram(Program.EXECUTION, Program.EXECUTION, layout); | ||
} | ||
|
||
/** | ||
* Save a sample program data | ||
* Saves a sample program. | ||
* | ||
* @param String the name of a new program | ||
* @param BlockSpaceLayout the programming space that has blocks | ||
* @param programName the name of a new program | ||
* @param layout the programming space that has blocks | ||
*/ | ||
public boolean saveSampleProgram(String programName, BlockSpaceLayout layout) { | ||
return saveProgram(programName, Program.SAMPLE, layout); | ||
} | ||
|
||
/** | ||
* Save a user program data | ||
* Saves a user program. | ||
* | ||
* @param String the name of a new program | ||
* @param BlockSpaceLayout the programming space that has blocks | ||
* @param programName the name of a new program | ||
* @param layout the programming space that has blocks | ||
*/ | ||
public boolean saveUserProgram(String programName, BlockSpaceLayout layout) { | ||
return saveProgram(programName, Program.USER, layout); | ||
|
@@ -141,29 +138,29 @@ private boolean saveProgram(String programName, String programType, BlockSpaceLa | |
} | ||
|
||
/** | ||
* Load an execution program's block data (Sorted) | ||
* Loads an execution program's block data (sorted). | ||
* | ||
* @return ArrayList<BlockBase> loaded data | ||
* @return loaded data as {@link ArrayList<BlockBase>} | ||
*/ | ||
public ArrayList<BlockBase> loadExecutionProgram() { | ||
return loadProgram(Program.EXECUTION, Program.EXECUTION); | ||
} | ||
|
||
/** | ||
* Load a sample program's block data (Sorted) | ||
* Loads a sample program's block data (sorted). | ||
* | ||
* @param String the name of program | ||
* @return ArrayList<BlockBase> loaded data | ||
* @param programName the name of program | ||
* @return loaded data as {@link ArrayList<BlockBase>} | ||
*/ | ||
public ArrayList<BlockBase> loadSampleProgram(String programName) { | ||
return loadProgram(programName, Program.SAMPLE); | ||
} | ||
|
||
/** | ||
* Load a user program's block data | ||
* Loads a user program's block data | ||
* | ||
* @param String the name of program | ||
* @return ArrayList<BlockBase> loaded data | ||
* @param programName the name of program | ||
* @return loaded data as {@link ArrayList<BlockBase>} | ||
*/ | ||
public ArrayList<BlockBase> loadUserProgram(String programName) { | ||
return loadProgram(programName, Program.USER); | ||
|
@@ -217,18 +214,18 @@ private ArrayList<BlockBase> loadBlocks(SquidCursor<ProgramData> c) { | |
} | ||
|
||
/** | ||
* Load all sample program names | ||
* Loads all the sample program names. | ||
* | ||
* @return ArrayList<String> the names of sample programs | ||
* @return the names of sample programs as {@link ArrayList<String>} | ||
*/ | ||
public ArrayList<String> loadSampleProgramNames() { | ||
return loadProgramNames(Program.SAMPLE); | ||
} | ||
|
||
/** | ||
* Load all user program names | ||
* Loads all user program names | ||
* | ||
* @return ArrayList<String> the names of user programs | ||
* @return the names of user programs as {@link ArrayList<String>} | ||
*/ | ||
public ArrayList<String> loadUserProgramNames() { | ||
return loadProgramNames(Program.USER); | ||
|
@@ -256,24 +253,24 @@ else if (programType.equals(Program.SAMPLE)) { | |
} | ||
|
||
/** | ||
* Delete an execution program | ||
* Deletes an execution program. | ||
*/ | ||
public void deleteExecutionProgram() { | ||
deleteProgram(Program.EXECUTION, Program.EXECUTION); | ||
} | ||
|
||
/** | ||
* Delete a sample program with 'programName' | ||
* Deletes a sample program with <code>programName</code>. | ||
* | ||
* @param String the name of a sample program | ||
* @param programName the name of a sample program | ||
*/ | ||
public void deleteSampleProgram(String programName) { | ||
deleteProgram(programName, Program.SAMPLE); | ||
} | ||
/** | ||
* Delete a user program with 'programName' | ||
* Deletes a user program with <code>programName</code>. | ||
* | ||
* @param String the name of a user program | ||
* @param programName the name of a user program | ||
*/ | ||
public void deleteUserProgram(String programName) { | ||
deleteProgram(programName, Program.USER); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,9 +21,6 @@ | |
|
||
/** | ||
* Specification for "program_data" table | ||
* | ||
* @author <a href="mailto:[email protected]">Tatsuya Iwanari</a> | ||
* @version 1.0 22-March-2016 | ||
*/ | ||
@TableModelSpec(className="ProgramData", tableName="program_data", | ||
tableConstraint = "FOREIGN KEY(programId) references programs(_id) ON DELETE CASCADE") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,9 +22,6 @@ | |
|
||
/** | ||
* Specification for "programs" table | ||
* | ||
* @author <a href="mailto:[email protected]">Tatsuya Iwanari</a> | ||
* @version 1.0 22-March-2016 | ||
*/ | ||
@TableModelSpec(className="Program", tableName="programs") | ||
public class ProgramSpec { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.