0.3.1 GAMMA

This commit is contained in:
rob tillaart 2022-11-08 17:03:54 +01:00
parent 0f0cfd104e
commit 0124661de8
7 changed files with 81 additions and 27 deletions

View File

@ -1,3 +1,18 @@
platforms:
rpipico:
board: rp2040:rp2040:rpipico
package: rp2040:rp2040
gcc:
features:
defines:
- ARDUINO_ARCH_RP2040
warnings:
flags:
packages:
rp2040:rp2040:
url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
compile:
# Choosing to run compilation tests on 2 different Arduino platforms
platforms:
@ -9,3 +24,9 @@ compile:
- esp32
# - esp8266
# - mega2560
- rpipico
# Declaring Dependent Arduino Libraries (to be installed via the Arduino Library Manager)
libraries:
- "printHelpers"

View File

@ -0,0 +1,45 @@
# Change Log Gamma
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.3.1] - 2022-11-08
- add changelog.md
- add rp2040 to build-CI
- update readme.md
## [0.3.0] - 2022-07-26
- change return type begin() + setGamma()
- add test gamma <=0 in setGamma()
- add _table == NULL tests
- fixed type of index in [] operator.
- adjust rounding in setGamma() to minimize errors.
- update build-CI
----
## [0.2.2 2022-07-25
- split in .h and .cpp
- add Stream parameter to dump()
- add dumpArray(Stream)
- fix distinct()
## [0.2.1 2021-12-18
- update library.json, license,
- add constants, minor edits.
## [0.2.0 2021-11-02
- update build-CI, badges
- add begin() - fixes ESP32 crash.
----
## [0.1.1] - 2020-12-24
- Arduino-CI + unit test
## [0.1.0] - 2020-08-08
- initial release

View File

@ -84,13 +84,18 @@ See example.
## Future ideas
#### must
- improve documentation
#### should
- test other platforms
- look for optimizations
- getter \[\]
- setGamma -> pow() is expensive
#### could
- uint16 version?
- GAMMA16, GAMMA32,
- GAMMA_RGB ?
-

View File

@ -1,28 +1,11 @@
//
// FILE: gamma.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.3.0
// VERSION: 0.3.1
// DATE: 2020-08-08
// PURPOSE: Arduino Library to efficiently hold a gamma lookup table
// 0.1.0 2020-08-08 initial release
// 0.1.1 2020-12-24 Arduino-CI + unit test
//
// 0.2.0 2021-11-02 update build-CI, badges
// add begin() - fixes ESP32 crash.
// 0.2.1 2021-12-18 update library.json, license,
// add constants, minor edits.
// 0.2.2 2022-07-25 split in .h and .cpp
// add Stream parameter to dump()
// add dumpArray(Stream)
// fix distinct()
//
// 0.3.0 2022-07-26 change return type begin() + setGamma()
// add test gamma <=0 in setGamma()
// add _table == NULL tests
// fixed type of index in [] operator.
// adjust rounding in setGamma() to minimize errors.
// update build-CI
// HISTORY: see changelog.md
#include "gamma.h"
@ -31,7 +14,7 @@
GAMMA::GAMMA(uint16_t size)
{
_shift = 7;
// force power of 2; get shift & mask right
// force power of 2; get shift & mask right
for (uint16_t s = 2; s <= GAMMA_MAX_SIZE; s <<= 1)
{
if (size <= s)

View File

@ -2,17 +2,17 @@
//
// FILE: gamma.h
// AUTHOR: Rob Tillaart
// VERSION: 0.3.0
// VERSION: 0.3.1
// DATE: 2020-08-08
// PURPOSE: Arduino Library to efficiently hold a gamma lookup table
#include "Arduino.h"
#define GAMMA_LIB_VERSION (F("0.3.0"))
#define GAMMA_LIB_VERSION (F("0.3.1"))
#define GAMMA_DEFAULT_SIZE 32
#define GAMMA_MAX_SIZE 256
#define GAMMA_DEFAULT_SIZE 32
#define GAMMA_MAX_SIZE 256
class GAMMA

View File

@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/GAMMA.git"
},
"version": "0.3.0",
"version": "0.3.1",
"license": "MIT",
"frameworks": "arduino",
"platforms": "*",

View File

@ -1,5 +1,5 @@
name=GAMMA
version=0.3.0
version=0.3.1
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino Library for the GAMMA function