mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.3.1 GAMMA
This commit is contained in:
parent
0f0cfd104e
commit
0124661de8
@ -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:
|
compile:
|
||||||
# Choosing to run compilation tests on 2 different Arduino platforms
|
# Choosing to run compilation tests on 2 different Arduino platforms
|
||||||
platforms:
|
platforms:
|
||||||
@ -9,3 +24,9 @@ compile:
|
|||||||
- esp32
|
- esp32
|
||||||
# - esp8266
|
# - esp8266
|
||||||
# - mega2560
|
# - mega2560
|
||||||
|
- rpipico
|
||||||
|
|
||||||
|
# Declaring Dependent Arduino Libraries (to be installed via the Arduino Library Manager)
|
||||||
|
libraries:
|
||||||
|
- "printHelpers"
|
||||||
|
|
||||||
|
45
libraries/GAMMA/CHANGELOG.md
Normal file
45
libraries/GAMMA/CHANGELOG.md
Normal 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
|
||||||
|
|
@ -84,13 +84,18 @@ See example.
|
|||||||
|
|
||||||
## Future ideas
|
## Future ideas
|
||||||
|
|
||||||
|
#### must
|
||||||
- improve documentation
|
- improve documentation
|
||||||
|
|
||||||
|
#### should
|
||||||
- test other platforms
|
- test other platforms
|
||||||
- look for optimizations
|
- look for optimizations
|
||||||
- getter \[\]
|
- getter \[\]
|
||||||
- setGamma -> pow() is expensive
|
- setGamma -> pow() is expensive
|
||||||
|
|
||||||
|
#### could
|
||||||
- uint16 version?
|
- uint16 version?
|
||||||
- GAMMA16, GAMMA32,
|
- GAMMA16, GAMMA32,
|
||||||
- GAMMA_RGB ?
|
- GAMMA_RGB ?
|
||||||
-
|
|
||||||
|
|
||||||
|
@ -1,28 +1,11 @@
|
|||||||
//
|
//
|
||||||
// FILE: gamma.cpp
|
// FILE: gamma.cpp
|
||||||
// AUTHOR: Rob Tillaart
|
// AUTHOR: Rob Tillaart
|
||||||
// VERSION: 0.3.0
|
// VERSION: 0.3.1
|
||||||
// DATE: 2020-08-08
|
// DATE: 2020-08-08
|
||||||
// PURPOSE: Arduino Library to efficiently hold a gamma lookup table
|
// 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
|
// HISTORY: see changelog.md
|
||||||
// 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
|
|
||||||
|
|
||||||
|
|
||||||
#include "gamma.h"
|
#include "gamma.h"
|
||||||
@ -31,7 +14,7 @@
|
|||||||
GAMMA::GAMMA(uint16_t size)
|
GAMMA::GAMMA(uint16_t size)
|
||||||
{
|
{
|
||||||
_shift = 7;
|
_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)
|
for (uint16_t s = 2; s <= GAMMA_MAX_SIZE; s <<= 1)
|
||||||
{
|
{
|
||||||
if (size <= s)
|
if (size <= s)
|
||||||
|
@ -2,17 +2,17 @@
|
|||||||
//
|
//
|
||||||
// FILE: gamma.h
|
// FILE: gamma.h
|
||||||
// AUTHOR: Rob Tillaart
|
// AUTHOR: Rob Tillaart
|
||||||
// VERSION: 0.3.0
|
// VERSION: 0.3.1
|
||||||
// DATE: 2020-08-08
|
// DATE: 2020-08-08
|
||||||
// PURPOSE: Arduino Library to efficiently hold a gamma lookup table
|
// PURPOSE: Arduino Library to efficiently hold a gamma lookup table
|
||||||
|
|
||||||
|
|
||||||
#include "Arduino.h"
|
#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_DEFAULT_SIZE 32
|
||||||
#define GAMMA_MAX_SIZE 256
|
#define GAMMA_MAX_SIZE 256
|
||||||
|
|
||||||
|
|
||||||
class GAMMA
|
class GAMMA
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/RobTillaart/GAMMA.git"
|
"url": "https://github.com/RobTillaart/GAMMA.git"
|
||||||
},
|
},
|
||||||
"version": "0.3.0",
|
"version": "0.3.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"frameworks": "arduino",
|
"frameworks": "arduino",
|
||||||
"platforms": "*",
|
"platforms": "*",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name=GAMMA
|
name=GAMMA
|
||||||
version=0.3.0
|
version=0.3.1
|
||||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||||
sentence=Arduino Library for the GAMMA function
|
sentence=Arduino Library for the GAMMA function
|
||||||
|
Loading…
Reference in New Issue
Block a user