Commit Graph

226 Commits

Author SHA1 Message Date
Pharap bc63e39931 Add constructors to Rect 2018-11-13 12:15:55 -05:00
Pharap 54d47ec04e
Remove unncessary limits.h includes 2018-09-03 07:37:16 +01:00
Scott Allen 0eae58c760 Fix initRandomSeed(). Minor code and doc changes
The call to generateRandomSeed() in initRandomSeed() was missing
parentheses.

Added keyword for generateRandomSeed.

Minor code changes, and documentation changes and additions.
2018-04-23 15:44:15 -04:00
Pharap 4c2e412985
Introduce generateRandomSeed function 2018-04-18 01:33:30 +01:00
Scott Allen 58ae256412 Change version to 5.1.0 2018-04-07 07:33:28 -04:00
Scott Allen 928c40813d Make sure TX and RX LEDs are off in mainNoUSB() 2018-04-07 07:28:15 -04:00
Scott Allen b8c1cb742a Add EEPROM flag to disable RGB LED with boot logo
Flag SYS_FLAG_SHOW_LOGO_LEDS added to EEPROM_SYS_FLAGS.
The boot logo functions check the flag and leave the RGB LED off if
the flag isn't set.

Added functions writeShowBootLogoLEDsFlag() and
readShowBootLogoLEDsFlag() for writing and reading the
SYS_FLAG_SHOW_LOGO_LEDS flag.

Example sketch SetSystemEEPROM modified to allow setting the
SYS_FLAG_SHOW_LOGO_LEDS flag.
2018-04-07 07:09:49 -04:00
Scott Allen 15db34cab2 Change version to 5.0.0 2018-03-22 08:11:24 -04:00
Scott Allen 674ac8a774 Don't disable timer 0 for Arduboy core 2018-03-22 08:11:24 -04:00
Scott Allen 9a13011474 Use display() in begin() instead of blank()
This saves some code since display() is used multiple times but
blank() normally isn't.
2018-03-22 08:11:24 -04:00
Scott Allen a43e745250 Add system EEPROM flag to disable the boot logo
Flag SYS_FLAG_SHOW_LOGO added to EEPROM_SYS_FLAGS. The boot logo
functions check the flag and bypass the logo sequence if the flag
isn't set.

Added functions writeShowBootLogoFlag() and readShowBootLogoFlag()
for writing and reading the SYS_FLAG_SHOW_LOGO flag.

Renamed example sketch SetNameAndID to SetSystemEEPROM and added
the ability to set the SYS_FLAG_SHOW_LOGO flag, plus menus to reset
the system and user EEPROM areas.
2018-03-22 08:11:24 -04:00
Delio Brignoli da2c7e3d35 Add SpritesB class as alternative to Sprites
The SpritesB class has functions identical to those in Sprites.
When used in place of Sprites it will usually reduce code size (at the
expense of slower execution speed). Code size reduction is accomplished
by factoring all draw modes into the same loop.

Modifications made to the Sprites class to create this class made by
@dxxb (Delio Brignoli).

Creation of the SpritesB class and documentation by
@MLXXXp (Scott Allen).

Also, bootLogoSpritesBSelfMasked() and bootLogoSpritesBOverwrite()
alternative boot logo functions added by @MLXXXp.
2018-03-22 08:11:24 -04:00
Scott Allen 53b50a9766 Add some previously missed keywords 2018-03-22 08:11:07 -04:00
Scott Allen d76eb15c51 Explicitly specify the type in doxygen code blocks
Just to be safe.
2018-03-11 05:40:44 -04:00
Scott Allen c00fee0a78 Add the ability to eliminate the USB stack code
Macro ARDUBOY_NO_USB will provide a substitute main() which will cause
the compiler to leave out the USB code. The macro also adds a check
for the DOWN button being pressed and, if so, will call the new
exitToBootloader() function.

New function exitToBootloader() will invoke the bootloader in command
mode, similar to pressing reset.
2018-03-11 05:40:44 -04:00
Scott Allen fb77929126 Refactor setRGBled() and add freeRGBled()
- setRGBled() has been rewritten to directly control the hardware
  instead of using the Arduino analogWrite() function.

- Added a two parameter version of setRGBled() that sets the brightness
  of one LED without affecting the others.

- Added function freeRGBled() for freeing the PWM control of the LEDs
  so they can be used digitally.

- Added example sketch RGBled.
2018-03-11 05:40:44 -04:00
Scott Allen eb041d24f8 Add function to wait for all buttons released
New function waitNoButtons() replaces the code at the end of begin()
that waits for all buttons to be released. This is to make it easier
to add back this functionality when using boot() in place of begin().
2018-03-11 05:40:44 -04:00
Scott Allen 53ea8188d5 Add Beep classes for playing simple tones
Also added a BeepDemo example sketch and modified the ArduBreakout
example sketch to use the BeepPin1 class instead of Arduino tone().
2018-03-11 05:40:44 -04:00
Scott Allen 460e768ea9 Refactor nextFrame() and add setFrameDuration()
nextFrame() changes were in colaboration with @MrBlinky

setFrameDuration() can be used as an alternative to setFrameRate()
2018-03-11 05:40:44 -04:00
Mr.Blinky 4788b1ab01 Refactor buttonsState()
By @MrBlinky
With some source code formatting and cleanup by @MLXXXp (Scott Allen).
2018-03-11 05:39:57 -04:00
Scott Allen d356be4e13 Refactor and speed up bootLogo functions 2018-03-04 13:51:37 -05:00
Scott Allen 6e1c47cbe0 Refactor idle() to reduce code size 2018-03-04 13:42:17 -05:00
Mr.Blinky bd726fc112 Refactor and optimise paintScreen() in assembler
By @MrBlinky with contributions from @veritazz (Michael Gollnick) and
@MLXXXp (Scott Allen).
2018-03-04 13:31:43 -05:00
Scott Allen d44b89e01f Minor source format changes for drawCompressed()
No code changes from previous commit.
2018-01-17 13:56:25 -05:00
Pharap 6f6849a5bb Reduce drawCompressed progmem usage (#19)
Reduce drawCompressed() progmem usage
2018-01-17 13:51:34 -05:00
Scott Allen f8f46de06d
Merge pull request #18 from eried/master
Fix typo in the code example for everyXFrames()
2017-12-19 09:43:08 -05:00
Erwin Ried d6336803a2 Small typo on the code example 2017-12-19 15:33:01 +01:00
Scott Allen 93c33f6ad6 Change characters used for Sprites examples 2017-12-10 09:13:11 -05:00
Scott Allen 5e58d9b6a8 Fix minor grammar error in Sprites documentation 2017-12-09 22:48:59 -05:00
Scott Allen b159b3751b Add info on sketch EEPROM use to README.md 2017-12-01 16:57:15 -05:00
Scott Allen 6360eb2b37 modify library.json to conform to documentation
Put the exclude field under the export object.
2017-10-02 15:46:46 -04:00
Scott Allen 383bdfc144 fix and clarify Sprite assembly comments 2017-08-28 21:31:10 -04:00
Scott Allen 420b958208 Merge branch 'master' of https://github.com/MLXXXp/Arduboy2 2017-08-28 21:13:10 -04:00
Scott Allen 5370409875 fix documentation comments for initRandomSeed() 2017-08-28 21:09:13 -04:00
Scott Allen 6416166ae7 Merge pull request #15 from yyyc514/sprite_register_fix
fix random display glitches with sprite rendering
2017-08-28 21:03:51 -04:00
Josh Goebel 4478b1fe0a fix random display glitches with sprite rendering
Sometimes the compiler would assign r28/29 to one of our input
variables despite our needing to use that register ourselves. This
fix attempts to prevent that from happening and also cleans up a
few other small details.

- remove unnecessary y_count (-1 register)
- set buffer_ofs_2 inside assembly (-1 register)
- require inputs/outputs to use lower or simple upper registers
2017-08-26 14:55:02 -04:00
Scott Allen 1bb4726ed0 Change version to 4.1.0 2017-07-31 17:10:21 -04:00
Scott Allen fe30863dbe Add complimentary "get" for text "set" functions
Added functions getTextColor(), getTextBackground(),
getTextSize() and getTextWrap() to the Arduboy2 class
2017-07-31 16:57:28 -04:00
Scott Allen 6ab6b83e2c Fix some small errors in documentation comments 2017-07-31 11:56:10 -04:00
Scott Allen fd614ab586 Change version to 4.0.2 2017-07-07 11:38:02 -04:00
Scott Allen e6e82bf336 Fix initialisation of Right button for DevKit 2017-07-07 11:30:48 -04:00
Scott Allen 46ecb2dd78 Change version to 4.0.1 2017-06-16 18:44:44 -04:00
Scott Allen b121d19b77 Refactor fillScreen() 2017-06-16 18:37:19 -04:00
Scott Allen bd5b470294 Change drawPixel() to avoid Z reg corruption
Also use _BV() to specify bit masks in the bitshift_left array,
and other minor formatting changes
2017-06-16 18:05:19 -04:00
Scott Allen 6074f9fc56 Merge pull request #14 from Pharap/master
Fix bug in drawPixel asm
2017-06-16 17:59:03 -04:00
Pharap 427c1d53f2 Fix bug in drawPixel asm 2017-06-14 19:31:54 +01:00
Scott Allen 342186281a Change version to 4.0.0 2017-04-26 10:14:51 -04:00
Scott Allen 3c4915b0d5 Add commented out logo alternatives to begin() 2017-04-26 10:08:07 -04:00
Scott Allen a01ceffb20 Fix improper masking in Sprites drawPlusMask()
As per Josh Goebel @yyyc514
2017-04-25 15:36:42 -04:00
Scott Allen babf6893c8 Eliminate "may be uninitialized" variable warning
Code in Sprites.cpp refactored to eliminate
"warning: 'mask_ofs' may be used uninitialized in this function"
2017-04-25 15:36:42 -04:00