-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #132 from karlTH/master
fixe some bug
- Loading branch information
Showing
182 changed files
with
6,760 additions
and
270 deletions.
There are no files selected for viewing
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
28 changes: 28 additions & 0 deletions
28
src/main/java/com/ardublock/translator/block/DuinoEDU/CodeHeadBlock.java
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.ardublock.translator.block.Duinoedu; | ||
|
||
import com.ardublock.translator.Translator; | ||
import com.ardublock.translator.block.TranslatorBlock; | ||
import com.ardublock.translator.block.exception.SocketNullException; | ||
import com.ardublock.translator.block.exception.SubroutineNotDeclaredException; | ||
|
||
public class CodeHeadBlock extends TranslatorBlock | ||
{ | ||
public CodeHeadBlock(Long blockId, Translator translator, String codePrefix, String codeSuffix, String label) | ||
{ | ||
super(blockId, translator, codePrefix, codeSuffix, label); | ||
} | ||
|
||
@Override | ||
public String toCode() throws SocketNullException, SubroutineNotDeclaredException | ||
{ | ||
translator.addDefinitionCommand("//libraries at http://duinoedu.com/dl/lib/autre/EDU_CodeCache/"); | ||
TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(0); | ||
translator.addHeaderFile("codeCache.h"); | ||
String ret = translatorBlock.toCode(); | ||
//ret=ret.substring(1); | ||
//ret=ret.replace(ret.substring(ret.length()-1),""); | ||
ret=ret+";\n"; | ||
translator.addDefinitionCommand(ret); | ||
return ""; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/com/ardublock/translator/block/DuinoEDU/CodeLoopBlock.java
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.ardublock.translator.block.Duinoedu; | ||
|
||
import com.ardublock.translator.Translator; | ||
import com.ardublock.translator.block.TranslatorBlock; | ||
import com.ardublock.translator.block.exception.SocketNullException; | ||
import com.ardublock.translator.block.exception.SubroutineNotDeclaredException; | ||
|
||
public class CodeLoopBlock extends TranslatorBlock | ||
{ | ||
public CodeLoopBlock(Long blockId, Translator translator, String codePrefix, String codeSuffix, String label) | ||
{ | ||
super(blockId, translator, codePrefix, codeSuffix, label); | ||
} | ||
|
||
@Override | ||
public String toCode() throws SocketNullException, SubroutineNotDeclaredException | ||
{ | ||
translator.addDefinitionCommand("//libraries at http://duinoedu.com/dl/lib/autre/EDU_CodeCache/"); | ||
translator.addHeaderFile("codeCache.h"); | ||
TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(0); | ||
String ret = "\t"+translatorBlock.toCode(); | ||
//ret=ret.substring(1); | ||
//ret=ret.replace(ret.substring(ret.length()),";"); | ||
ret=ret+";\n"; | ||
return ret; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/com/ardublock/translator/block/DuinoEDU/CodeSetupBlock.java
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.ardublock.translator.block.Duinoedu; | ||
|
||
import com.ardublock.translator.Translator; | ||
import com.ardublock.translator.block.TranslatorBlock; | ||
import com.ardublock.translator.block.exception.SocketNullException; | ||
import com.ardublock.translator.block.exception.SubroutineNotDeclaredException; | ||
|
||
public class CodeSetupBlock extends TranslatorBlock | ||
{ | ||
public CodeSetupBlock(Long blockId, Translator translator, String codePrefix, String codeSuffix, String label) | ||
{ | ||
super(blockId, translator, codePrefix, codeSuffix, label); | ||
} | ||
|
||
@Override | ||
public String toCode() throws SocketNullException, SubroutineNotDeclaredException | ||
{ | ||
translator.addDefinitionCommand("//libraries at http://duinoedu.com/dl/lib/autre/EDU_CodeCache/"); | ||
translator.addHeaderFile("codeCache.h"); | ||
TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(0); | ||
String ret = translatorBlock.toCode(); | ||
//ret=ret.substring(1); | ||
//ret=ret.replace(ret.substring(ret.length()-1),""); | ||
ret=ret+";\n"; | ||
translator.addSetupCommandForced(ret); | ||
return ""; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/com/ardublock/translator/block/DuinoEDU/Gps_ActiverInterruption.java
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.ardublock.translator.block.Duinoedu; | ||
|
||
import com.ardublock.translator.Translator; | ||
import com.ardublock.translator.block.TranslatorBlock; | ||
import com.ardublock.translator.block.exception.SocketNullException; | ||
|
||
public class Gps_ActiverInterruption extends TranslatorBlock | ||
{ | ||
|
||
public Gps_ActiverInterruption(Long blockId, Translator translator, String codePrefix, String codeSuffix, String label) { | ||
super(blockId, translator, codePrefix, codeSuffix, label); | ||
} | ||
|
||
@Override | ||
public String toCode() throws SocketNullException { | ||
return codePrefix + "monGps.activerInterruption();" + codeSuffix; | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/com/ardublock/translator/block/DuinoEDU/Gps_Angle.java
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.ardublock.translator.block.Duinoedu; | ||
|
||
import com.ardublock.translator.Translator; | ||
import com.ardublock.translator.block.TranslatorBlock; | ||
import com.ardublock.translator.block.exception.SocketNullException; | ||
|
||
public class Gps_Angle extends TranslatorBlock | ||
{ | ||
|
||
public Gps_Angle(Long blockId, Translator translator, String codePrefix, String codeSuffix, String label) { | ||
super(blockId, translator, codePrefix, codeSuffix, label); | ||
} | ||
|
||
@Override | ||
public String toCode() throws SocketNullException { | ||
return codePrefix + "monGps.angle()" + codeSuffix; | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/com/ardublock/translator/block/DuinoEDU/Gps_Day.java
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.ardublock.translator.block.Duinoedu; | ||
|
||
import com.ardublock.translator.Translator; | ||
import com.ardublock.translator.block.TranslatorBlock; | ||
import com.ardublock.translator.block.exception.SocketNullException; | ||
|
||
public class Gps_Day extends TranslatorBlock | ||
{ | ||
|
||
public Gps_Day(Long blockId, Translator translator, String codePrefix, String codeSuffix, String label) { | ||
super(blockId, translator, codePrefix, codeSuffix, label); | ||
} | ||
|
||
@Override | ||
public String toCode() throws SocketNullException { | ||
return codePrefix + "monGps.jour()" + codeSuffix; | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/com/ardublock/translator/block/DuinoEDU/Gps_DesactiverInterruption.java
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.ardublock.translator.block.Duinoedu; | ||
|
||
import com.ardublock.translator.Translator; | ||
import com.ardublock.translator.block.TranslatorBlock; | ||
import com.ardublock.translator.block.exception.SocketNullException; | ||
|
||
public class Gps_DesactiverInterruption extends TranslatorBlock | ||
{ | ||
|
||
public Gps_DesactiverInterruption(Long blockId, Translator translator, String codePrefix, String codeSuffix, String label) { | ||
super(blockId, translator, codePrefix, codeSuffix, label); | ||
} | ||
|
||
@Override | ||
public String toCode() throws SocketNullException { | ||
return codePrefix + "monGps.desactiverInterruption();" + codeSuffix; | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/com/ardublock/translator/block/DuinoEDU/Gps_Hour.java
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.ardublock.translator.block.Duinoedu; | ||
|
||
import com.ardublock.translator.Translator; | ||
import com.ardublock.translator.block.TranslatorBlock; | ||
import com.ardublock.translator.block.exception.SocketNullException; | ||
|
||
public class Gps_Hour extends TranslatorBlock | ||
{ | ||
|
||
public Gps_Hour(Long blockId, Translator translator, String codePrefix, String codeSuffix, String label) { | ||
super(blockId, translator, codePrefix, codeSuffix, label); | ||
} | ||
|
||
@Override | ||
public String toCode() throws SocketNullException { | ||
return codePrefix + "monGps.Gps_Hour()" + codeSuffix; | ||
} | ||
|
||
} |
53 changes: 53 additions & 0 deletions
53
src/main/java/com/ardublock/translator/block/DuinoEDU/Gps_Init.java
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.ardublock.translator.block.Duinoedu; | ||
|
||
import com.ardublock.translator.Translator; | ||
import com.ardublock.translator.block.TranslatorBlock; | ||
import com.ardublock.translator.block.exception.SocketNullException; | ||
import com.ardublock.translator.block.exception.SubroutineNotDeclaredException; | ||
|
||
public class Gps_Init extends TranslatorBlock { | ||
|
||
public Gps_Init (Long blockId, Translator translator, String codePrefix, String codeSuffix, String label) | ||
{ | ||
super(blockId, translator, codePrefix, codeSuffix, label); | ||
} | ||
|
||
//@Override | ||
public String toCode() throws SocketNullException, SubroutineNotDeclaredException | ||
{ | ||
String connect; | ||
String jetlag; | ||
String Interruption; | ||
String Info; | ||
String Frequence; | ||
|
||
TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(0); | ||
connect = translatorBlock.toCode(); | ||
translatorBlock = this.getRequiredTranslatorBlockAtSocket(1); | ||
Interruption = translatorBlock.toCode(); | ||
translatorBlock = this.getRequiredTranslatorBlockAtSocket(2); | ||
jetlag = translatorBlock.toCode(); | ||
translatorBlock = this.getRequiredTranslatorBlockAtSocket(3); | ||
Info = translatorBlock.toCode(); | ||
translatorBlock = this.getRequiredTranslatorBlockAtSocket(4); | ||
Frequence = translatorBlock.toCode(); | ||
|
||
translator.addHeaderFile("Adafruit_GPS.h"); | ||
translator.addHeaderFile("SoftwareSerial.h"); | ||
translator.addHeaderFile("duinoeduGpsAdd.h"); | ||
translator.addDefinitionCommand("//libraries at http://duinoedu.com/dl/lib/dupont/EDU_Adafruit_GPS/ \n//libraries at http://duinoedu.com/dl/lib/dupont/EDU_duinoeduGpsAdd/\n " | ||
+ "duinoeduGpsAdd monGps;\n" | ||
+ "EDUGPS_INTERRUPTION(HORLOGE_0_DEPASSE_VALEUR_A) {\n" | ||
+ " monGps.lireUnCaractere();\n" | ||
+ "}\n"); | ||
translator.addSetupCommand(connect+Interruption+"monGps.definirDecalageHoraire("+jetlag+");"); | ||
translator.addSetupCommand("monGps.definirQuantiteInformation("+Info+");"); | ||
translator.addSetupCommand("monGps.definirFrequenceTrames(EDUGPS_"+Frequence+"HZ);"); | ||
String ret; | ||
|
||
ret = ""; | ||
|
||
|
||
return ret ; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/com/ardublock/translator/block/DuinoEDU/Gps_LatitudeDirection.java
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.ardublock.translator.block.Duinoedu; | ||
|
||
import com.ardublock.translator.Translator; | ||
import com.ardublock.translator.block.TranslatorBlock; | ||
import com.ardublock.translator.block.exception.SocketNullException; | ||
|
||
public class Gps_LatitudeDirection extends TranslatorBlock | ||
{ | ||
|
||
public Gps_LatitudeDirection(Long blockId, Translator translator, String codePrefix, String codeSuffix, String label) { | ||
super(blockId, translator, codePrefix, codeSuffix, label); | ||
} | ||
|
||
@Override | ||
public String toCode() throws SocketNullException { | ||
return codePrefix + "monGps.latitudeDirection()" + codeSuffix; | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/com/ardublock/translator/block/DuinoEDU/Gps_LatitudeGoogleMaps.java
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.ardublock.translator.block.Duinoedu; | ||
|
||
import com.ardublock.translator.Translator; | ||
import com.ardublock.translator.block.TranslatorBlock; | ||
import com.ardublock.translator.block.exception.SocketNullException; | ||
|
||
public class Gps_LatitudeGoogleMaps extends TranslatorBlock | ||
{ | ||
|
||
public Gps_LatitudeGoogleMaps(Long blockId, Translator translator, String codePrefix, String codeSuffix, String label) { | ||
super(blockId, translator, codePrefix, codeSuffix, label); | ||
} | ||
|
||
@Override | ||
public String toCode() throws SocketNullException { | ||
return codePrefix + "monGps.latitudeGoogleMapsNbr()" + codeSuffix; | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/com/ardublock/translator/block/DuinoEDU/Gps_LatitudeNbr.java
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.ardublock.translator.block.Duinoedu; | ||
|
||
import com.ardublock.translator.Translator; | ||
import com.ardublock.translator.block.TranslatorBlock; | ||
import com.ardublock.translator.block.exception.SocketNullException; | ||
|
||
public class Gps_LatitudeNbr extends TranslatorBlock | ||
{ | ||
|
||
public Gps_LatitudeNbr(Long blockId, Translator translator, String codePrefix, String codeSuffix, String label) { | ||
super(blockId, translator, codePrefix, codeSuffix, label); | ||
} | ||
|
||
@Override | ||
public String toCode() throws SocketNullException { | ||
return codePrefix + "monGps.latitudeNbr()" + codeSuffix; | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/com/ardublock/translator/block/DuinoEDU/Gps_LongitudeDirection.java
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.ardublock.translator.block.Duinoedu; | ||
|
||
import com.ardublock.translator.Translator; | ||
import com.ardublock.translator.block.TranslatorBlock; | ||
import com.ardublock.translator.block.exception.SocketNullException; | ||
|
||
public class Gps_LongitudeDirection extends TranslatorBlock | ||
{ | ||
|
||
public Gps_LongitudeDirection(Long blockId, Translator translator, String codePrefix, String codeSuffix, String label) { | ||
super(blockId, translator, codePrefix, codeSuffix, label); | ||
} | ||
|
||
@Override | ||
public String toCode() throws SocketNullException { | ||
return codePrefix + "monGps.longitudeDirection()" + codeSuffix; | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/com/ardublock/translator/block/DuinoEDU/Gps_LongitudeGoogleMaps.java
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.ardublock.translator.block.Duinoedu; | ||
|
||
import com.ardublock.translator.Translator; | ||
import com.ardublock.translator.block.TranslatorBlock; | ||
import com.ardublock.translator.block.exception.SocketNullException; | ||
|
||
public class Gps_LongitudeGoogleMaps extends TranslatorBlock | ||
{ | ||
|
||
public Gps_LongitudeGoogleMaps(Long blockId, Translator translator, String codePrefix, String codeSuffix, String label) { | ||
super(blockId, translator, codePrefix, codeSuffix, label); | ||
} | ||
|
||
@Override | ||
public String toCode() throws SocketNullException { | ||
return codePrefix + "monGps.longitudeGoogleMapsNbr()" + codeSuffix; | ||
} | ||
|
||
} |
Oops, something went wrong.