Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/aunit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: AUnit Tests

on: [push]

jobs:
build:

runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2

- name: Setup
run: |
cd ..
git clone https://github.com/bxparks/UnixHostDuino
git clone https://github.com/bxparks/AUnit
git clone https://github.com/bxparks/AceCommon
git clone https://github.com/bxparks/AceRoutine

- name: Verify examples
run: |
make -C examples

- name: Verify tests
run: |
make -C tests
make -C tests runtests
22 changes: 5 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
# Changelog

* Unreleased
* 0.2.1 (2020-09-17)
* Formatting tweaks and rewording in preparation for Library Manager
publication.
* 0.2 (2020-09-14)
* Add `timing_stats` utility with `TimingStats` class.
* Add `print_utils` utility with `printfTo()` and `printPad{N}To()`
functions.
* Add `PrintStrN` class which allocates buffer on heap.
* Rename `PrintString` to `PrintStr` to avoid name conflict with an
existing `PrintString` library that does something similar.
* Add `examples/url_encoding/AutoBenchmark` program to determine speed
of `formUrlEncode()` and `formUrlDecode()` functions, compared to the
original code. Determine that new code is 5-6X faster, which eliminates
need to call `yield()` on each iteration.
* 0.1 (2020-08-27)
* Add `print_str` utility.
* Add `url_encoding` utility.
* 0.3 (2020-11-01)
* Move `CrcEeprom` class from AceTime library.
* Move `CommandLineInterface` package from AceRoutine library.
* Move all previous utlities (with no external dependencies) into the
AceCommon library.
77 changes: 36 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,35 @@
# AceUtils

This library contains Arduino utilities which are too small to be in separate
libraries, but I use them in multiple projects or libraries. To avoid
duplication, I have collected them into this library. Many of these are not
meant for public consumption, but if you find them useful, then you are
welcome to use them.

This library contains the following utilities:

* [PrintStr](src/print_str/)
* `#include <PrintStr.h>`
* `use namespace print_str;`
* Provides 2 classes with an in-memory buffer that implement the `Print`
interface so that quantities can be printed into it. The string
can then be extracted as a normal c-string (`const char*`).
* `PrintStr<SIZE>`: Templatized class with a buffer of
`SIZE` bytes on the stack. `SIZE` must be known at compile-time.
* `PrintStrN(uint16_t size)`: A normal class which creates a buffer of
`size` on the heap, which is immediately reclaimed when the object
is no longer used. The `size` can be either run-time or compile time
values.
* Both of these are meant to be an alternative to the Arduino `String` class
to avoid or reduce heap fragmentation.
* [UrlEncoding](src/url_encoding/)
* `#include <UrlEncoding.h>`
* `use namespace url_encoding;`
* Encodes and decodes strings using "form URL encoding" which converts
spaces `' '` into `'+'`, and non-alphnumerics into percent-hex digits.
* [TimingStats](src/timing_stats/)
* `#include <TimingStats.h>`
* `use namespace timing_stats;`
* Helper class to collect data (often durations in milliseconds) and
then print out various statistics such as min, max, average, and count.
* [PrintUtils](src/print_utils/)
* `#include <PrintUtils.h>`
* `use namespace print_utils;`
* Useful utilities on `Print` objects such as `Serial`. Includes
`printfTo()`, `printPad2To()` to `printPad5To()` functions.

**Version**: 0.2.1 (2020-09-17)
libraries, but too high-level (with external dependencies) to be included in the
AceCommon (https://github.com/bxparks/AceCommon) library. The AceCommon library
must remain self-contained without any external dependencies. The utilities in
AceUtils will generally have dependencies to my other libraries (e.g. AceCommon,
AceTime, AceRoutine, etc) or third party libraries.

* CrcEeprom
* `#include <CrcEeprom.h>`
* `using crc_eeprom::CrcEeprom`
* summary: Store data structures in EEPROM with a CRC check.
* depends on:
* FastCRC (https://github.com/FrankBoesing/FastCRC)
* CommandLineInterface
* [src/cli/README.md](src/cli/README.md)
* `#include <CommandLineInterface.h>`
* `using namespace cli`
* summary: Implement a command line interface over the Serial port.
* depends on:
* AceRoutine (https://github.com/bxparks/AceRoutine)
* AceCommon (https://github.com/bxparks/AceCommon)

**Version**: 0.3 (2020-11-01)

**Changelog**: [CHANGELOG.md](CHANGELOG.md)

## Installation

The latest stable release will be available in the Arduino IDE Library
Manager soon. Search for "AceUtils". Click Install. (Not yet).
Manager. Search for "AceUtils". Click Install.

The development version can be installed by cloning the
[GitHub repository](https://github.com/bxparks/AceUtils), checking out the
Expand All @@ -68,9 +52,20 @@ The [docs/](docs/) directory contains the
This may be useful to navigate the various classes in this library
and to lookup the signatures of the methods in those classes.

### Examples

* [examples/CrcEepromDemo](examples/CrcEepromDemo)
* Demo of `CrcEeprom` class.
* [examples/CommandLineShell](examples/CommandLineShell)
* Demo of the `<CommandLineInterface.h>` classes to implement a command line
interface that accepts a number of commands on the serial port. In other
words, it is a primitive "shell". The shell is non-blocking and uses
coroutines so that other coroutines continue to run.

## Usage

See the `README.md` for each of the various utilties listed above.
The documentation is mostly in the code right now. I will add more as time
allows.

## System Requirements

Expand All @@ -84,7 +79,7 @@ This library was developed and tested using:
* [SparkFun AVR Boards 1.1.12](https://github.com/sparkfun/Arduino_Boards)
* [SparkFun SAMD Boards 1.6.2](https://github.com/sparkfun/Arduino_Boards)
* [ESP8266 Arduino 2.7.4](https://github.com/esp8266/Arduino)
* [ESP32 Arduino 1.0.2](https://github.com/espressif/arduino-esp32)
* [ESP32 Arduino 1.0.4](https://github.com/espressif/arduino-esp32)
* [Teensydino 1.46](https://www.pjrc.com/teensy/td_download.html)

It should work with [PlatformIO](https://platformio.org/) but I have
Expand Down
4 changes: 2 additions & 2 deletions docs/doxygen.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ PROJECT_NAME = "AceUtils"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.2.1
PROJECT_NUMBER = 0.3

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.

PROJECT_BRIEF = "Useful Arduino utilties which are too small for separate libraries."
PROJECT_BRIEF = "Useful Arduino utilties which are too small as separate libraries, but complex enough to have external dependencies to other libraries."

# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55
Expand Down
12 changes: 6 additions & 6 deletions docs/html/AceUtils_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceUtils
&#160;<span id="projectnumber">0.2.1</span>
&#160;<span id="projectnumber">0.3</span>
</div>
<div id="projectbrief">Useful Arduino utilties which are too small for separate libraries.</div>
<div id="projectbrief">Useful Arduino utilties which are too small as separate libraries, but complex enough to have external dependencies to other libraries.</div>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -76,10 +76,10 @@
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> * MIT License</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">// Version format: &quot;xx.yy.zz&quot; -&gt; xxyyzz without leading 0</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#define ACE_UTILS_VERSION 200</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#define ACE_UTILS_VERSION_STRING &quot;0.2&quot;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">// Version format: &quot;xx.yy.zz&quot; -&gt; xxyyzz without leading 0</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor">#define ACE_UTILS_VERSION 200</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="preprocessor">#define ACE_UTILS_VERSION_STRING &quot;0.2&quot;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160; </div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Expand Down
Loading