1) Tedious to test a library
I wonder how the 3rd part library provider does their test⦠It seems like they make a library repo, whack the entire folder in the libraries
folder and runs their examples to compile etc.
One method i used is to symlink
.
The current setup for requires making another folder, paste the library and compile. Iβm sure we have a better way to do this!
2) Migrate + Contribute not working
- Tested using: https://github.com/kennethlimcp/spark-adxl345
-
particle library migrate
: Library migrated to v2 format: -
particle library contribute
: This library could not be imported. Try another library or try this one again later.
Original:
.
βββ LICENSE
βββ README.md
βββ firmware
β βββ ADXL345.cpp
β βββ ADXL345.h
β βββ binary.h
β βββ examples
β βββ 1_reg_print.cpp
β βββ 2_no_lib.cpp
β βββ 3_run.cpp
βββ spark.json
Migrated:
Library migrated to v2 format: '/Users/kennethlimcp/Desktop/Arduino-lib-official/spark-adxl345'
KENMBP:spark-adxl345 kennethlimcp$ tree
.
βββ LICENSE
βββ README.md
βββ examples
β βββ 1_reg_print
β β βββ 1_reg_print.cpp
β βββ 2_no_lib
β β βββ 2_no_lib.cpp
β βββ 3_run
β βββ 3_run.cpp
βββ library.properties
βββ src
βββ ADXL345
β βββ ADXL345.h
β βββ binary.h
βββ ADXL345.cpp
βββ ADXL345.h
βββ binary.h
3.) We need to be able to use .ino
in the src folder
Using the .cpp
format requires me to create the function prototypes needed in the .ino
file so thatβs cubersome.
Example:
In .ino file
attachInterrupt(0, interruptRoutine, FALLING);
void interruptRoutine() {
isr_flag = 1;
}
In .cpp file
void interruptRoutine();
attachInterrupt(0, interruptRoutine, FALLING);
void interruptRoutine() {
isr_flag = 1;
}
4. Spaces in original library name
Adafruit_Sensor kennethlimcp$ p library contribute
Library is not valid. name must only contain letters, numbers, dashes and underscores
KENMBP:Adafruit_Sensor kennethlimcp$ cat library.properties
name=Adafruit Unified Sensor
version=1.0.2
author=Adafruit <info@adafruit.com>
maintainer=Adafruit <info@adafruit.com>
sentence=Required for all Adafruit Unified Sensor based libraries.
paragraph=A unified sensor abstraction layer used by many Adafruit sensor libraries.
category=Sensors
url=https://github.com/adafruit/Adafruit_Sensor
architectures=*
5. License required for each library
This is not a requirement in the Arduino 3rd party libraries so essentially this requirement makes all ported libraries different from the upstream.