Skip to content

Commit

Permalink
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
Browse files Browse the repository at this point in the history
… into vertx-webxr
  • Loading branch information
supertick committed Jul 23, 2023
2 parents ccceb78 + 55d0163 commit 24cfa91
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/myrobotlab/service/Cron.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public TaskHistory(String id, Date now) {
/**
* map of tasks organized by id
*/
public Map<String, Task> tasks = new LinkedHashMap<>();
protected Map<String, Task> tasks = new LinkedHashMap<>();

public Cron(String n, String id) {
super(n, id);
Expand Down
31 changes: 16 additions & 15 deletions src/main/java/org/myrobotlab/service/Hd44780.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public void attachPcf8574(Pcf8574 pcf8574) {
pcf = pcf8574;
isAttached = true;
pcfName = pcf.getName();
pcf.writeRegister((byte) 0b11110000); // Make sure we initilise the PCF8574
pcf.writeRegister((byte) 0b11110000); // Make sure we initialize the PCF8574
// output state
broadcastState();
}
Expand All @@ -177,7 +177,8 @@ public void attachPcf8574(Pcf8574 pcf8574) {
* display, only the first 16 characters will be used On the 4 line x
* 20 display, when writing to Line 0, the 21st character will appear
* on line 2 When writing to line 1, the 21st character will appear
* on line 3
* on line 3. There is a gap in line 2, the setDramAddress method will
* check for valid addresses
* @param line
* l
*
Expand All @@ -195,7 +196,7 @@ public void display(String string, int line) {
setDdramAddress((byte) 0x00);
break;
case 1:
setDdramAddress((byte) 0x28);
setDdramAddress((byte) 0x40);
break;
case 2:
setDdramAddress((byte) 0x14);
Expand Down Expand Up @@ -408,9 +409,9 @@ public boolean getBlinkEnable() {
}

/**
* Display on/off control. When the display os off, no charaters are displayed
* at all. The cursor is the line under the charater and may be on or off.
* Blink when set to on blinks the entire charater box where the cursor is.
* Display on/off control. When the display os off, no character are displayed
* at all. The cursor is the line under the character and may be on or off.
* Blink when set to on blinks the entire character box where the cursor is.
*
* @param display
* true the display is on. false the display is off.
Expand Down Expand Up @@ -488,29 +489,29 @@ public void clearDisplay() {
* memory. Each memory location corresponds to a position on the display For
* both 2 x 16 displays and the 4 x 20 displays: Address 0 is the left most
* character on the first line. Address 40 is the left most character on the
* second line. For the 4 x 20 dispalys: Address 20 is the left most character
* second line. For the 4 x 20 display: Address 20 is the left most character
* on the third line. Address 60 is the left most character on the fourth
* line. A continous series of writes to the DDRAM will wrap from the end of
* the first line to the start of the thrid line, then back to the second line
* line. A continuous series of writes to the DDRAM will wrap from the end of
* the first line to the start of the third line, then back to the second line
* and finally the fourth line.
*
* @param address
*/
public void setDdramAddress(int address) {
if (address < 0 || (address > 40 && address < 63) || address > 108) {
error("%d Outside allowed DDRAM Address range 0 - 108", address);
error("%d Outside allowed DDRAM Address range must valid range is 0-40 and 63-108", address);
return;
}
lcdWriteCmd((byte) (address | 0b10000000));
}


/**
* Set the address to read or write data to the Caracter Generator RAM. The
* HD44780 has a built in 205 charater generator rom as well as a 8 charater
* Set the address to read or write data to the character Generator RAM. The
* HD44780 has a built in 205 character generator from as well as a 8 character
* generator RAM. The only the lower 5 bits are used with 8 bytes allocated to
* each of the 8 characters that may be used. Not that the last by of each
* charater is not used as this is where the cursor sits.
* character is not used as this is where the cursor sits.
*
* @param address
*/
Expand Down Expand Up @@ -563,7 +564,7 @@ private void lcdWriteData(byte data) {
* Set or clear the test busy flag in the HD44780. There are two ways of
* ensuring the HD44780 is ready for the next instruction. You can either read
* the instruction register until the MSB D7 is clear. Or you can wait a
* minimum time peiod that ensure the device is ready. The longest busy period
* minimum time period that ensure the device is ready. The longest busy period
* is 10mS after a power reset.
*
* @param setFlag
Expand All @@ -584,7 +585,7 @@ public boolean getVerifyBusyFlag() {

/**
* This method will first make sure the HD44780 is in a known state and that
* we are syncrnised to the state. It does this by setting the module into 8
* we are synchronized to the state. It does this by setting the module into 8
* bit mode then setting it back to 4 bit mode.
*/
private void setInterface() {
Expand Down

0 comments on commit 24cfa91

Please sign in to comment.