Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
tft height width
- Loading branch information
Showing
6 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
src/main/java/com/ardublock/translator/block/Esplora/TFT_Height.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,29 @@ | ||
package com.ardublock.translator.block.Esplora; | ||
|
||
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 TFT_Height extends TranslatorBlock { | ||
|
||
public TFT_Height (Long blockId, Translator translator, String codePrefix, String codeSuffix, String label) | ||
{ | ||
super(blockId, translator, codePrefix, codeSuffix, label); | ||
} | ||
//@Override | ||
public String toCode() throws SocketNullException, SubroutineNotDeclaredException | ||
{ | ||
|
||
|
||
translator.addHeaderFile("Esplora.h"); | ||
translator.addHeaderFile("TFT.h"); | ||
translator.addHeaderFile("SPI.h"); | ||
String ret = "EsploraTFT.height()"; | ||
|
||
return codePrefix + ret + codeSuffix; | ||
|
||
} | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/com/ardublock/translator/block/Esplora/TFT_Width.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,29 @@ | ||
package com.ardublock.translator.block.Esplora; | ||
|
||
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 TFT_Width extends TranslatorBlock { | ||
|
||
public TFT_Width (Long blockId, Translator translator, String codePrefix, String codeSuffix, String label) | ||
{ | ||
super(blockId, translator, codePrefix, codeSuffix, label); | ||
} | ||
//@Override | ||
public String toCode() throws SocketNullException, SubroutineNotDeclaredException | ||
{ | ||
|
||
|
||
translator.addHeaderFile("Esplora.h"); | ||
translator.addHeaderFile("TFT.h"); | ||
translator.addHeaderFile("SPI.h"); | ||
String ret = "EsploraTFT.width()"; | ||
|
||
return codePrefix + ret + codeSuffix; | ||
|
||
} | ||
|
||
} |
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
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