77'' -- see below for terms of use
88'' E-mail..... stephen@ironsheep.biz
99'' Started.... Oct 2020
10- '' Updated.... 17 Oct 2020
10+ '' Updated.... 01 Dec 2020
1111''
1212'' =================================================================================================
1313
@@ -109,13 +109,13 @@ PUB fillScreen(rgbColor) | row, column
109109 pixels.drawPixelAtRC(row, column, rgbColor)
110110
111111PUB fillPanel(threeBitColor)
112- '' fill screen but without PWM (for testing underlying driver)
112+ '' Fill screen but without PWM (for testing underlying driver)
113113 panel.fillPanel(threeBitColor)
114114
115115PUB commitScreenToPanel()
116116 '' Write sceen to panel driver
117117 'debug("- DISP: commit!")
118- panel.loadScreen (@screen0)
118+ panel.convertScreen2PWM (@screen0)
119119
120120
121121{ -------------- Text Handling -------------- }
@@ -125,13 +125,13 @@ PUB setCursor(line, column)
125125 ' TODO emit error on bad column/row?
126126 cursorLine := 0 #> line <# maxTextLines - 1
127127 cursorColumn := 0 #> column <# maxTextColumns - 1
128-
128+
129129PUB homeCursor()
130- '' return the cursor to top left corner of our display
130+ '' Return the cursor to top left corner of our display
131131 setCursor(0, 0)
132132
133133PUB setTextFont(newFont) | scrollerIndex, hUnusedPix, vUnusedPix
134- '' Select font and update text grid size
134+ '' Select font and update text grid size
135135 ' currently we only support our 8x8 and 5x7 fonts
136136 case newFont
137137 TEXT_FONT_DEFAULT..TEXT_FONT_5x7:
@@ -191,19 +191,19 @@ PUB setTextFont(newFont) | scrollerIndex, hUnusedPix, vUnusedPix
191191 repeat scrollerIndex from 0 to MAX_SCROLLING_REGIONS - 1
192192 scroller[scrollerIndex].setFontInfo(maxTextColumns, charWidthInPix, charHeightInPix, leftOffsetInPix, horizontalGapInPix, hBitmapOffsetInPix, selectedTextFont)
193193
194- PUB setTextColor(rgbColor)
194+ PUB setTextColor(rgbColor)
195195 '' Set 24-bit color for subsequent text display
196196 currTextColor := rgbColor
197197
198- PUB setTextAtCursor(zString)
198+ PUB setTextAtCursor(zString)
199199 '' Place text 'zero terminated' at our current cursor position using current text color
200200 setColoredTextAtLnCol(cursorLine, cursorColumn, zString, currTextColor)
201201
202202PUB setColoredTextAtLnCol(line, column, pString, rgbColor) | charIndex
203203 '' Place text at specific cursor position using current text color
204204 setCursor(line, column)
205205 charIndex := 0
206- repeat
206+ repeat
207207 if byte[pString][charIndex] <> 0
208208 setColorCharAtCursor(byte[pString][charIndex++], rgbColor)
209209 while byte[pString][charIndex] <> 0
@@ -249,18 +249,18 @@ PUB setColoredCharAtLnCol(line, column, cChar, rgbColor) | pCharBitMap, tlScreen
249249
250250PUB scrollText(indexAllocated, loopCount)
251251 'debug("dsp:scrollText() ", udec(indexAllocated))
252- '' specify scrolling text duration (forever, once, twice)
252+ '' Specify scrolling text duration (forever, once, twice)
253253 if indexAllocated >= 0 && indexAllocated < MAX_SCROLLING_REGIONS
254254 scroller[indexAllocated].scrollText(loopCount)
255255
256256
257- PUB scrollTextOnLine(line, pZString, direction) : indexAllocated
258- '' place scolling text on line N, of pZString scrolling in direction using current text color
257+ PUB scrollTextOnLine(line, pZString, direction) : indexAllocated
258+ '' Place scolling text on line N, of pZString scrolling in direction using current text color
259259 indexAllocated := scrollColoredTextOnLn(line, pZString, direction, currTextColor)
260260
261261
262262PUB scrollColoredTextOnLn(line, pZString, direction, rgbColor) : indexAllocated | cLineIndex, cColumnIndex, widthInChars, sRowPixIndex, sColumnPixIndex
263- '' place scolling text on line N [0 - N-1], of pZString scrolling in direction using rgbColor
263+ '' Place scolling text on line N [0 - N-1], of pZString scrolling in direction using rgbColor
264264 'debug("dsp:scrollColoredTextOnLn()")
265265 ' ensure we are asked to use a good location
266266 cLineIndex := 0 #> line <# maxTextLines - 1
@@ -274,13 +274,13 @@ PUB scrollColoredTextOnLn(line, pZString, direction, rgbColor) : indexAllocated
274274 indexAllocated := scrollTextAtRCOfColor(sRowPixIndex, sColumnPixIndex, widthInChars, pZString, direction, rgbColor)
275275
276276
277- PUB scrollTextAtRC(row, column, widthInChars, pZString, direction) : indexAllocated
278- '' place scolling text at absolute R,C, of pZString scrolling in direction using current text color
277+ PUB scrollTextAtRC(row, column, widthInChars, pZString, direction) : indexAllocated
278+ '' Place scolling text at absolute R,C, of pZString scrolling in direction using current text color
279279 indexAllocated := scrollTextAtRCOfColor(row, column, widthInChars, pZString, direction, currTextColor)
280280
281281
282282PUB scrollTextAtRCOfColor(row, column, widthInChars, pZString, direction, rgbColor) : indexAllocated
283- '' place scolling text at absolute R,C, of pZString scrolling in direction using rgbColor
283+ '' Place scolling text at absolute R,C, of pZString scrolling in direction using rgbColor
284284 indexAllocated := nextFreeScroller()
285285 'debug("dsp:scrollTextAtRCOfColor() ", udec(indexAllocated))
286286 scroller[indexAllocated].scrollTextAtRCOfColor(row, column, widthInChars, pZString, direction, rgbColor)
@@ -315,11 +315,11 @@ PRI nextFreeScroller() : scrollerIndexToUse | scrollerIndex
315315{ -------------- Basic Graphics -------------- }
316316
317317PUB drawBox(topRow, leftColumn, width, height, filled)
318- '' Draw draw box outline/filled of width x height at R,C (using current text color)
318+ '' Draw box outline/filled of width x height at R,C (using current text color)
319319 drawBoxOfColor(topRow, leftColumn, width, height, filled, currTextColor)
320320
321321PUB drawBoxOfColor(topRow, leftColumn, width, height, filled, rgbColor) | rightColumn, bottomRow, rowIndex
322- '' Draw draw box outline/filled of width x height at R,C using rgbColor
322+ '' Draw box outline/filled of width x height at R,C using rgbColor
323323 rightColumn := leftColumn + width - 1
324324 bottomRow := topRow + height - 1
325325 if filled == TRUE
@@ -345,11 +345,11 @@ PUB drawLineOfColor(fmRow, fmColumn, toRow, toColumn, rgbColor) | row, column, d
345345 toColumn := 0 #> toColumn <# screen.MAX_DISPLAY_COLUMNS - 1
346346 if fmRow == toRow
347347 ' draw Horizontal Line
348- repeat column from fmColumn to toColumn
348+ repeat column from fmColumn to toColumn
349349 pixels.drawPixelAtRC(fmRow, column, rgbColor)
350350 elseif fmColumn == toColumn
351351 ' draw Vertical Line
352- repeat row from fmRow to toRow
352+ repeat row from fmRow to toRow
353353 pixels.drawPixelAtRC(row, fmColumn, rgbColor)
354354 else
355355 dx := (toColumn - fmColumn)
@@ -363,7 +363,7 @@ PUB drawLineOfColor(fmRow, fmColumn, toRow, toColumn, rgbColor) | row, column, d
363363 column := fmColumn
364364 row := fmRow
365365 ctr := 1
366- repeat while (ctr <= incr)
366+ repeat while (ctr <= incr)
367367 pixels.drawPixelAtRC(row, column, rgbColor)
368368 column += dx
369369 row += dy
@@ -390,7 +390,6 @@ PRI isDebugLocn(nRow, nCol) : status
390390 status := TRUE ' FALSE ' turn off debug
391391
392392
393-
394393CON { license }
395394
396395{{
@@ -419,6 +418,5 @@ CON { license }
419418 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
420419 SOFTWARE.
421420 =================================================================================================
422-
423- }}
424421
422+ }}
0 commit comments