Skip to content

Commit

Permalink
Version 3.4 zum Master machen (#143)
Browse files Browse the repository at this point in the history
* SIGNALDuino.ino | SIGNALESP.ino

- FIX: If duration is greater than maxPulse it could happen that the timer time for the cronjob timer becomes negative (or a big value if it is unsigned)

* Set ArduinoJson Version to the desired one

* commands.h
- fixed output of version after ping response

* FIX names

* fixed: value of success must be saved before calling reset()

* NEW: Settings if LED_BUILTIN on WEMOS boards as PIN_LED

* PlattformIO Support incl. STM Support (#138)

* signalesp.h

- prevent crash if first char is a linebreak or #
- fixed crash with ; as command
- modified connection handling
- Implement a Wifi reconnect event to restart the telnet server (#136 )
- FIX: Min. timer time for cronTimer is 1ms


* commands.h

- added dumpEEPROM when doing factory reset
- FIX: unsupported command caused a crash
- add 0x17 chipid 

* Arduino IDE compatibility
- Added sym links to project files to support arduino compatible layout


* changed esp8266 core version to 2.6.3

* cc1101.cpp
- Added wait_miso call after select to repair factory reset

* SimpleFIFO.h
- enqueue: ICACHE_RAM_ATTR added to support usage via interrupt


* send.h
- fix unexpected serial print until null termination char is found
- cleanup some code

* signalDecoder/src/signalDecoder.cpp
- prevents crashes

* Update some compile errors

* ESP32 support (#134)

* Maple Mini (stm32f103cbt6) support (#136)

* FIX: strobe commands register (#140)

* Update / fix deploy travis config (#142)

updated yml for successful deployment of release
fixed some yaml warnings on travis
  • Loading branch information
sidey79 authored Jul 16, 2020
1 parent bc3331b commit 51dcb7b
Show file tree
Hide file tree
Showing 135 changed files with 1,732 additions and 572 deletions.
116 changes: 82 additions & 34 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
language: cpp
sudo: required
os: linux
dist: xenial
env:
matrix:
jobs:
env:
- BOARD=nano328 RECEIVER=cc1101
- BOARD=radiono RECEIVER=cc1101
- BOARD=promini
- BOARD=radiono RECEIVER=cc1101
- BOARD=promini
- BOARD=ESP32 RECEIVER=cc1101
- BOARD=ESP8266 RECEIVER=cc1101
- BOARD=MAPLEMINI_F103CB RECEIVER=cc1101
global:
# - IDE_VERSION=1.8.8
- secure: JuFfMHl8rC9ZeUF2LWHvWb99xWHn7e+sQcGiFkUrVztrmH6L18r7wyOdCbEpxdHJphQdsBPj6S0qnA4RXuKoMizAQfEmZ01v9ZPXr1y6A+QF+ri3M2ZMicwEUfyT80oPUp+o33HPE7cKG8sq8eM4qlALTFf4VL8QsM4DLyMuZlfkMLa1SkglA6Z7W15Ftm3kPxzFqHt7g/Y0QbFus9NrmS28pE3uZKzMjPvMv5Uyq47Ua6dRGV8brXutN9qsx1La87VtunelOECE1s8RvkjuLVlcQS2YmGkqRWSdGQPKVnK4pH3EtJDZ3010hRfJCus02VsGXNqssDmfOYv8JxS/7TxI6d88VS+YpKrqWfsZ3e9KWL4SiCaTuh3V3OG3iddYWuU13dyZeXviJVaSmKcm0AKs+WdugsApB691d6wQ19ujPwdIaeR9+K68b7jjMJeftkYuheMY4iJHteJO10E5m1BC/VDl8ptWSFdGPmGRTV+uzhJINLkzuc/p8vj/XQh4lcCwssxvfYy1qF5xD+gmtpEvzHNN/lAy3AsJdAf+Ay1PC/3Uo5WP9NtlsYwY6QadDpM4fyObGCapTsLDf7J3sgD1YpZSUvjdDSFz4C8TbXCHfiogcCR+fPKrlctqNX76VnE871pAUdF45E33gFKTndL6s3E8EHmJFiLGVeMJp9Q=
Expand All @@ -17,20 +20,20 @@ script:
before_install:
- mkdir $PWD/SIGNALDuino
# - find $PWD/src/_micro-api/libraries -maxdepth 1 -depth -type d -not -name "libraries" | xargs -i find {}/src/ -maxdepth 1 -not -name "src" -not -name "examples" | xargs cp -a -t $PWD/SIGNALDuino/;
- find $PWD -maxdepth 1 -name "*.h" -or -name "*.cpp" -or -name "*.ino" | xargs cp -a -t $PWD/SIGNALDuino/
# - find $PWD -maxdepth 1 -name "*.h" -or -name "*.cpp" -or -name "*.ino" | xargs cp -a -t $PWD/SIGNALDuino/
- wget http://downloads.arduino.cc/arduino-$IDE_VERSION-linux64.tar.xz
install:
- tar xf arduino-$IDE_VERSION-linux64.tar.xz;
- sudo mv arduino-$IDE_VERSION /usr/local/share/arduino;
- sudo ln -s /usr/local/share/arduino/arduino /usr/local/bin/arduino;
- ln -s $PWD/src/_micro-api/libraries/bitstore /usr/local/share/arduino/libraries/bitstore
- ln -s $PWD/src/_micro-api/libraries/output /usr/local/share/arduino/libraries/output
- ln -s $PWD/src/_micro-api/libraries/signalDecoder /usr/local/share/arduino/libraries/signalDecoder
- ln -s $PWD/src/_micro-api/libraries/SimpleFIFO /usr/local/share/arduino/libraries/simpleFIFO
- ln -s $PWD/src/_micro-api/libraries/fastdelegate /usr/local/share/arduino/libraries/fastdelegate
- ln -s $PWD/src/_micro-api/libraries/TimerOne /usr/local/share/arduino/libraries/TimerOne
- ln -s $PWD/src/_micro-api/libraries/WIFIManager /usr/local/share/arduino/libraries/WIFIManager
- ln -s $PWD/src/_micro-api/libraries/ArduinoJson /usr/local/share/arduino/libraries/ArduinoJson
# - ln -s $PWD/src/_micro-api/libraries/bitstore /usr/local/share/arduino/libraries/bitstore
# - ln -s $PWD/src/_micro-api/libraries/output /usr/local/share/arduino/libraries/output
# - ln -s $PWD/src/_micro-api/libraries/signalDecoder /usr/local/share/arduino/libraries/signalDecoder
# - ln -s $PWD/src/_micro-api/libraries/SimpleFIFO /usr/local/share/arduino/libraries/simpleFIFO
# - ln -s $PWD/src/_micro-api/libraries/fastdelegate /usr/local/share/arduino/libraries/fastdelegate
# - ln -s $PWD/src/_micro-api/libraries/TimerOne /usr/local/share/arduino/libraries/TimerOne
# - ln -s $PWD/src/_micro-api/libraries/WIFIManager /usr/local/share/arduino/libraries/WIFIManager
# - ln -s $PWD/src/_micro-api/libraries/ArduinoJson /usr/local/share/arduino/libraries/ArduinoJson
- arduino --pref "compiler.warning_level=all" --save-prefs;
- mkdir $PWD/release;
- arduino --pref "build.path=$PWD/release" --save-prefs;
Expand All @@ -49,50 +52,68 @@ before_deploy:
- chmod +x ./deploy.sh;
deploy:
# - ./deploy.sh
skip_cleanup: true
provider: releases
api_key:
skip_cleanup: true
draft: true
prerelease: true
token:
secure: X2FfofClmMfz7Uch6QZYcBCDHfRblljHjMioNOvZdRU0eL1SapPnbCAL4Aff5eox4loJHm0sjRMemCXEDWkbgGxIjGqYaXe9eLdQn/jXUMuGlF+UgWxJsU5xj0kvMA3e6qMD/8gwnmfCFmLamDrYzvOgUOnNLnTmWFHiERLRBdd+b+LZ/68kX1VHnkmEKDEGIt+QfhQM5dO4fZF1MdPsho9mXlPGLSj81S3njAdMKnWVatBWXdNSAMwhJDARO+nfGXHSNoEY/RBmzmt7VTPScnCXrASjsuzHFmU0GvjG1zV8pBPNmj26TlST74xdtWGA7Czl7mLbYup1Q/GATy1s4LrQP/wXHHKKBccg2czlD7I6YgeuTbwgLncmtk918hcqnu4Zn8I2tuUxlB8V1G0u2XMeyQx3jcodxF4I36c1yge+VrW2FeDIl2qOGJwn5Azff4T1SAd49YJGyLMZfVkZljzhUVb92rKrcX33TW2eVyG4kNd6aOi/mH8niNJlsU5osfjhtBP0zQM89QroMV9AMpLfltmMBFGlcH4hxb9gjCWFZXwGqgka5fEAVTCJhp/GNhwuCN754/vdoGaA78zHkOPPIZ2CIBvX93BH2QtaRz+8inY6xA6g4ScVVp3lMjrqe1NdCCR6j927vkp+lvCPj6OLBhkcM4QcYQffRqmaAHY=
file: $PWD/release/SIGNALDuino_${BOARD}${RECEIVER}${TRAVIS_TAG}.hex
on:
repo: RFD-FHEM/SIGNALDuino
tags: true
prerelease: true
draft: true
condition: $TRAVIS_BUILD_STAGE_NAME = "Deploy"
#condition: "$TRAVIS_EVENT_TYPE = cron"
#condition: $TRAVIS_TAG =~ ^release.*$
condition: $TRAVIS_BUILD_STAGE_NAME = "deploy"
all_branches: true
#condition: $TRAVIS_BRANCH =~ ^dev-r33.*

jobs:
include:
-
-
stage: deploy
env:
- BOARD=nano
- RECEIVER=cc1101
-
-
stage: deploy
env:
- BOARD=nano328
-
-
stage: deploy
env:
- BOARD=radino
- RECEIVER=cc1101
before_script:
- arduino --pref boardsmanager.additional.urls=http://library.radino.cc/Arduino_1_8/package_radino_radino32_index.json --save-prefs;
-
-
stage: deploy
env:
- BOARD=minicul
- RECEIVER=cc1101
-
-
stage: deploy
env:
- BOARD=promini
-
-
stage: deploy
env:
- BOARD=ESP32
- RECEIVER=cc1101
before_script:
- arduino --pref "boardsmanager.additional.urls=https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" --save-prefs
- arduino --install-boards esp32:esp32
- arduino --board esp32:esp32:esp32:FlashMode=qio,FlashFreq=80 --save-prefs
after_success:
- mv $PWD/release/SIGNALDuino.ino.bin $PWD/release/SIGNALDuino_${BOARD}${RECEIVER}${TRAVIS_TAG}.hex
-
stage: deploy
env:
- BOARD=ESP32
before_script:
- arduino --pref "boardsmanager.additional.urls=https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" --save-prefs
- arduino --install-boards esp32:esp32
- arduino --board esp32:esp32:esp32:FlashMode=qio,FlashFreq=80 --save-prefs
after_success:
- mv $PWD/release/SIGNALDuino.ino.bin $PWD/release/SIGNALDuino_${BOARD}${RECEIVER}${TRAVIS_TAG}.hex
-
stage: deploy
env:
- BOARD=ESP8266
Expand All @@ -102,21 +123,48 @@ jobs:
# - git clone --branch ota http://github.com/tzapu/WiFiManager.git /usr/local/share/arduino/libraries/WIFIManager
- arduino --pref "boardsmanager.additional.urls=http://arduino.esp8266.com/stable/package_esp8266com_index.json" --save-prefs
# - arduino --install-library "ArduinoJson:5.13.2";
- arduino --install-boards esp8266:esp8266:2.4.2
- arduino --board esp8266:esp8266:generic:CpuFrequency=80,ResetMethod=ck,CrystalFreq=26,FlashFreq=40,FlashMode=dio,FlashSize=1M64,LwIPVariant=v2mss536,Debug=Disabled,DebugLevel=None____,UploadSpeed=115200 --save-prefs
- arduino --install-boards esp8266:esp8266:2.6.3
- arduino --board esp8266:esp8266:generic:xtal=80,eesz=1M64,FlashMode=qio,FlashFreq=40,dbg=Serial,lvl=CORE --save-prefs
after_success:
- mv $PWD/release/SIGNALDuino.ino.bin $PWD/release/SIGNALDuino_${BOARD}${RECEIVER}${TRAVIS_TAG}.hex
-
-
stage: deploy
env:
- BOARD=ESP8266
before_script:
- arduino --pref "boardsmanager.additional.urls=http://arduino.esp8266.com/stable/package_esp8266com_index.json" --save-prefs
- arduino --install-boards esp8266:esp8266:2.4.2
- arduino --board esp8266:esp8266:generic:CpuFrequency=80,ResetMethod=ck,CrystalFreq=26,FlashFreq=40,FlashMode=dio,FlashSize=1M64,LwIPVariant=v2mss536,Debug=Disabled,DebugLevel=None____,UploadSpeed=115200 --save-prefs
- arduino --install-boards esp8266:esp8266:2.6.3
- arduino --board esp8266:esp8266:generic:xtal=80,eesz=1M64,FlashMode=qio,FlashFreq=40,dbg=Serial,lvl=CORE --save-prefs
after_success:
- mv $PWD/release/SIGNALDuino.ino.bin $PWD/release/SIGNALDuino_${BOARD}${RECEIVER}${TRAVIS_TAG}.hex
-
stage: deploy
env:
- BOARD=MAPLEMINI_F103CB
- RECEIVER=cc1101
before_script:
# Add json packages url to the Arduino IDE
- arduino --pref "boardsmanager.additional.urls=https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json" --save-prefs
# Install the latest core version
- arduino --install-boards STM32:stm32
# "package:arch:board" or "package:arch:board:options"
- arduino --board STM32:stm32:GenF1:pnum=MAPLEMINI_F103CB --save-prefs
after_success:
- mv $PWD/release/SIGNALDuino.ino.bin $PWD/release/SIGNALDuino_${BOARD}${RECEIVER}${TRAVIS_TAG}.hex
-
stage: deploy
env:
- BOARD=MAPLEMINI_F103CB
before_script:
# Add json packages url to the Arduino IDE
- arduino --pref "boardsmanager.additional.urls=https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json" --save-prefs
# Install the latest core version
- arduino --install-boards STM32:stm32
# "package:arch:board" or "package:arch:board:options"
- arduino --board STM32:stm32:GenF1:pnum=MAPLEMINI_F103CB --save-prefs
after_success:
- mv $PWD/release/SIGNALDuino.ino.bin $PWD/release/SIGNALDuino_${BOARD}${RECEIVER}${TRAVIS_TAG}.hex
-
-
stage: unittest
install: skip
before_install: skip
Expand Down Expand Up @@ -146,4 +194,4 @@ notifications:
on_failure: change
stages:
- unittest
- stage: deploy
- deploy
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SIGNALDuino uC v3.3.1 with cc1101 support
# SIGNALDuino uC v3.4.0-development with cc1101 support
[![Build Status](https://travis-ci.org/RFD-FHEM/SIGNALDuino.svg?branch=master)](https://travis-ci.org/RFD-FHEM/SIGNALDuino)

### Getting started
Expand All @@ -22,13 +22,16 @@ http://www.fhemwiki.de/wiki/SIGNALDuino

### Tested microcontrollers

* Aduino Nano
* RadinoCC1101
* Arduino Nano
* Arduino Pro Mini
* ESP32 (ESP32-WROOM-32 / ESP32-WROOM-32D)
* ESP8266
* RadinoCC1101
* STM32 F103CBT6 (Maple Mini, bootloader v1.0)

### ESP32 Notes

If you encounter problems compiling for ESP32, sorry the code for this microcontroller is currently not finished. Contributors are welcome. If you have mane errors from fastDelegate.h try adding this compiler flag:
If you encounter problems compiling for ESP32, sorry the code for this microcontroller is currently not finished tested with all variants from ESP32. Contributors are welcome. If you have mane errors from fastDelegate.h try adding this compiler flag:
-Wno-unused-local-typedef

### Signal from my device ist not detected
Expand Down Expand Up @@ -57,6 +60,4 @@ First, sorry. This software is not perfect.
4. Create a branch (git checkout -b my_branch)
5. Commit your changes (git commit -am "<some description>")
6 .Push to a developer branch (git push dev-<xyz >my_branch)
7. Open a Pull Request, put some useful informations there, what your extension does and why we should add it, reference to the open issues which are fixed whith this pull requet.


7. Open a Pull Request, put some useful informations there, what your extension does and why we should add it, reference to the open issues which are fixed whith this pull requet.
122 changes: 76 additions & 46 deletions __vm/.SIGNALDuino.vsarduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,77 +6,107 @@
All non-arduino files created by visual micro and all visual studio project or solution files can be freely deleted and are not required to compile a sketch (do not delete your own code!).
Note: debugger breakpoints are stored in '.sln' or '.asln' files, knowledge of last uploaded breakpoints is stored in the upload.vmps.xml file. Both files are required to continue a previous debug session without needing to compile and upload again
Hardware: Arduino Nano w/ ATmega328P, Platform=avr, Package=arduino
Hardware: NodeMCU 1.0 (ESP-12E Module), Platform=esp8266, Package=esp8266
*/

#if defined(_VMICRO_INTELLISENSE)

#ifndef _VSARDUINO_H_
#define _VSARDUINO_H_
#define __AVR_atmega328p__
#define __AVR_ATmega328P__
#define __AVR_ATmega328p__
#define F_CPU 16000000L
#define ARDUINO 10805
#define ARDUINO_AVR_NANO
#define ARDUINO_ARCH_AVR
#define __ESP8266_esp8266__
#define __ESP8266_ESP8266__
#define __ets__
#define ICACHE_FLASH
#define F_CPU 80000000L
#define LWIP_OPEN_SRC
#define ARDUINO 108010
#define ARDUINO_ESP8266_NODEMCU
#define ARDUINO_ARCH_ESP8266
#define ESP8266
#define __cplusplus 201103L
#define _Pragma(x)
#define __AVR__
#undef __cplusplus
#define __cplusplus 201103L
#define __STDC__
#define __ARM__
#define __arm__
#define __inline__
#define __asm__(...)
#define __asm__(x)
#define __asm__
#define __extension__
#define __inline__
#define __ATTR_PURE__
#define __ATTR_CONST__
#define __volatile__
#define GCC_VERSION 40902
#define __cplusplus 201103L

#define volatile(va_arg)
#define _CONST
#define __builtin_va_start
#define __builtin_va_end
#define __attribute__(...)
#define NOINLINE __attribute__((noinline))
#define prog_void
#define PGM_VOID_P int

#define __ASM
#define __INLINE
#define __attribute__(noinline)

#ifndef __builtin_constant_p
#define __builtin_constant_p __attribute__((__const__))
#endif
#ifndef __builtin_strlen
#define __builtin_strlen __attribute__((__const__))
#endif
//#define _STD_BEGIN
//#define EMIT
#define WARNING
#define _Lockit
#define __CLR_OR_THIS_CALL
#define C4005
#define _NEW

//typedef int uint8_t;
//#define __ARMCC_VERSION 400678
//#define PROGMEM
//#define string_literal
//
//#define prog_void
//#define PGM_VOID_P int
//

typedef int _read;
typedef int _seek;
typedef int _write;
typedef int _close;
typedef int __cleanup;

//#define inline

#define NEW_H
typedef void *__builtin_va_list;
//extern "C" void __cxa_pure_virtual() {;}
#define __builtin_clz
#define __builtin_clzl
#define __builtin_clzll
#define __builtin_labs
#define __builtin_va_list
typedef int __gnuc_va_list;

typedef int div_t;
typedef int ldiv_t;
#define __ATOMIC_ACQ_REL

#define __CHAR_BIT__
#define _EXFUN()

typedef void *__builtin_va_list;
//extern "C" void __cxa_pure_virtual() {;}
typedef unsigned char byte;
extern "C" void __cxa_pure_virtual() {;}


typedef long __INTPTR_TYPE__ ;
typedef long __UINTPTR_TYPE__ ;
typedef long __SIZE_TYPE__ ;
typedef long __PTRDIFF_TYPE__;


#include "new"
#include "Esp.h"


#include "arduino.h"
#include <pins_arduino.h>
//#undef F
//#define F(string_literal) ((const PROGMEM char *)(string_literal))
#undef PSTR
#define PSTR(string_literal) ((const PROGMEM char *)(string_literal))

//typedef unsigned char uint8_t;
//typedef unsigned int uint8_t;
#include "..\generic\Common.h"
#include "..\generic\pins_arduino.h"

#define pgm_read_byte(address_short) uint8_t()
#define pgm_read_word(address_short) uint16_t()
#define pgm_read_dword(address_short) uint32_t()
#define pgm_read_float(address_short) float()
#define pgm_read_ptr(address_short) short()
#undef F
#define F(string_literal) ((const PROGMEM char *)(string_literal))
#undef PSTR
#define PSTR(string_literal) ((const PROGMEM char *)(string_literal))
//current vc++ does not understand this syntax so use older arduino example for intellisense
//todo:move to the new clang/gcc project types.
#define interrupts() sei()
#define noInterrupts() cli()

#include "SIGNALDuino.ino"
#include "SIGNALESP.ino"
Expand Down
2 changes: 1 addition & 1 deletion build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fi


echo "Compile now for ${BOARD} with ${RECEIVER}"
arduino -v --verbose-build --verify $PWD/SIGNALDuino/SIGNALDuino.ino 2>&1
arduino -v --verbose-build --verify $PWD/src/arduino-ide/SIGNALDuino/SIGNALDuino.ino 2>&1
ARDUINO_RETURN_CODE=$?
echo "Compile ${BOARD} ${RECEIVER} finshed"
exit $ARDUINO_RETURN_CODE
Loading

0 comments on commit 51dcb7b

Please sign in to comment.