Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
slav-at-attachix committed Nov 16, 2018
2 parents d283ccb + 23937e5 commit 19ce990
Show file tree
Hide file tree
Showing 447 changed files with 10,845 additions and 37,980 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ nbproject
GTAGS
GRTAGS
GPATH

# Microsoft Visual SourceSafe files
vssver2.scc

.metadata
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,7 @@
path = Sming/Libraries/DFRobotDFPlayerMini
url = https://github.com/DFRobot/DFRobotDFPlayerMini.git
ignore = dirty
[submodule "Sming/Libraries/TM1637"]
path = Sming/Libraries/TM1637
url = https://github.com/avishorp/TM1637.git
ignore = dirty
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ matrix:
- os: linux
env: SDK_VERSION=2.0.0
- os: linux
env: SDK_VERSION=2.1.0
env: SDK_VERSION=3.0.0
git:
submodules: false
addons:
Expand Down Expand Up @@ -52,18 +52,18 @@ script:

- export SMING_HOME=$TRAVIS_BUILD_DIR/Sming
- export ESP_HOME=$TRAVIS_BUILD_DIR/opt/esp-alt-sdk
- if [ "$SDK_VERSION" == "2.1.0" ]; then export SDK_BASE=$SMING_HOME/third-party/ESP8266_NONOS_SDK;
- if [ "$SDK_VERSION" == "3.0.0" ]; then export SDK_BASE=$SMING_HOME/third-party/ESP8266_NONOS_SDK;
fi
- export PATH=$PATH:$ESP_HOME/xtensa-lx106-elf/bin:$ESP_HOME/utils/:$SMING_HOME/../.travis/tools
- cd $SMING_HOME
- if [ "$SDK_VERSION" == "2.0.0" ]; then ../.travis/tools/clang/format-pr.sh; fi
- cd $SMING_HOME
- make
- make STRICT=1
- make samples
- make clean samples-clean
- make ENABLE_CUSTOM_HEAP=1
- make Basic_Blink ENABLE_CUSTOM_HEAP=1
- make dist-clean; make HttpServer_ConfigNetwork ENABLE_CUSTOM_LWIP=2
- make ENABLE_CUSTOM_HEAP=1 STRICT=1
- make Basic_Blink ENABLE_CUSTOM_HEAP=1 DEBUG_VERBOSE_LEVEL=3
- make dist-clean; make HttpServer_ConfigNetwork ENABLE_CUSTOM_LWIP=2 STRICT=1
deploy:
provider: script
script: sh $TRAVIS_BUILD_DIR/.travis/deploy.sh $TRAVIS_TAG
Expand Down
37 changes: 26 additions & 11 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native develo
[![Sponsors](https://opencollective.com/Sming/sponsors/badge.svg)](#financial-contributions)
[![Download](https://img.shields.io/badge/download-~1.7M-orange.svg)](https://github.com/SmingHub/Sming/releases/latest)
[![Build](https://travis-ci.org/SmingHub/Sming.svg?branch=develop)](https://travis-ci.org/SmingHub/Sming)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a450c9b4df08406dba81456261304ace)](https://app.codacy.com/app/slaff2/SmingOfficial?utm_source=github.com&utm_medium=referral&utm_content=SmingHub/Sming&utm_campaign=Badge_Grade_Dashboard)

If you like **Sming**, give it a star, or fork it and [contribute](#contribute)!

[![GitHub stars](https://img.shields.io/github/stars/SmingHub/Sming.svg?style=social&label=Star)](https://github.com/SmingHub/Sming/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/SmingHub/Sming.svg?style=social&label=Fork)](https://github.com/SmingHub/Sming/network)

## Summary
* Highly effective in performance and memory usage (this is native firmware!)
Expand All @@ -27,21 +33,23 @@ Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native develo
* Crash handlers for analyzing/handling system restarts due to fatal errors or WDT resets.
* PWM support based on [Stefan Bruens PWM](https://github.com/StefanBruens/ESP8266_new_pwm.git)
* Optional custom heap allocation based on [Umm Malloc](https://github.com/rhempel/umm_malloc.git)
* Based on Espressif NONOS SDK. Tested with versions 1.4, 1.5 and 2.0.
* Based on Espressif NONOS SDK. Tested with versions 1.5 and 2.0. Experimental support for SDK version >= 3.0.0.

## Compatibility

OS/SDK | Linux | Mac OS X | Windows | FreeBSD-current |
-------|-------|----------|---------|-----------------|
UDK (v1.5) | n/a | n/a | [![Build status](https://ci.appveyor.com/api/projects/status/5aj0oi0wyk4uij00/branch/develop?svg=true)](https://ci.appveyor.com/project/slaff/sming-sb483/branch/develop) | n/a |
esp-open-sdk (v1.4, v1.5, v2.0) | :sunny: | :sunny: | n/a | n/a |
esp-open-sdk (v1.5, v2.0, v3.0 **) | :sunny: | :sunny: | n/a | :sunny: |

OS = Operating System.
SDK = Software Development Kit.
n/a = The selected SDK is not available on that OS.
- OS = Operating System.
- SDK = Software Development Kit.
- n/a = The selected SDK is not available on that OS.
- ** = experimental support

## Latest Stable Release
- [Sming V3.6.1](https://github.com/SmingHub/Sming/releases/tag/3.6.1)
- [Sming V3.7.0](https://github.com/SmingHub/Sming/releases/tag/3.7.0)


## Getting started
- [Windows](https://github.com/SmingHub/Sming/wiki/Windows-Quickstart)
Expand Down Expand Up @@ -204,7 +212,7 @@ void OtaUpdate()

For a complete example take a look at the [Basic_rBoot](samples/Basic_rBoot/app/application.cpp) sample.

### Embedded HTTP WebServer
### Embedded HTTP Web Server
```c++
server.listen(80);
server.addPath("/", onIndex);
Expand Down Expand Up @@ -288,16 +296,24 @@ make docs

The newly generated documentation will be located under Sming/docs/api.

## Financial contributions

## Contribute

You can contribute to Sming by
- Providing Pull Requests with new features, bug fixes, new ideas, etc.
Make sure to follow our [Coding-Style-Rules](https://github.com/SmingHub/Sming/wiki/Coding-Style-Rules). Read our [Contributing guide](https://github.com/SmingHub/Sming/blob/develop/CONTRIBUTING.md) for details.
- Testing our latest source code and reporting issues.
- Supporting us financially to acquire hardware for testing and implementing or out of gratitude

### Financial contributions

We welcome financial contributions in full transparency on our [open collective](https://opencollective.com/Sming) page.
They help us improve the project and the community around it. If you would like to support us you can [become a backer](https://opencollective.com/Sming#backer) or [a sponsor](https://opencollective.com/Sming#sponsor).

In addition to that anyone who is helping this project can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.



### Contributors
#### Backers and sponsors

Thank you to all the people who have backed Sming
<a href="https://opencollective.com/Sming#backers" target="_blank"><img src="https://opencollective.com/Sming/backers.svg?width=890"></a>
Expand All @@ -306,4 +322,3 @@ or sponsored it.

<a href="https://opencollective.com/Sming/sponsor/0/website" target="_blank"><img src="https://opencollective.com/Sming/sponsor/0/avatar.svg"></a>


2 changes: 1 addition & 1 deletion Sming/Libraries/ArduCAM/ArduCAMStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ArduCAMStream: public ReadWriteStream {
ArduCAMStream(ArduCAM *cam);
virtual ~ArduCAMStream();

virtual StreamType getStreamType() { return eSST_User; }
virtual StreamType getStreamType() const { return eSST_User; }

virtual uint16_t readMemoryBlock(char* data, int bufSize);
virtual bool seek(int len);
Expand Down
22 changes: 22 additions & 0 deletions Sming/Libraries/ArduinoJson/include/ArduinoJson/JsonObjectKey.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,28 @@ class JsonObjectKey {
JsonObjectKey(const char* key) : _value(key), _needs_copy(false) {}
JsonObjectKey(const String& key) : _value(key.c_str()), _needs_copy(true) {}

/** @brief This constructor allows a FlashString to be used directly as a key parameter without any further casting.
*
* @note Would like to use stack for this but buffer doesn't stay around long enough when used
* with JsonObject::createNestedArray()
*
* According to the documentation, the key parameter must be either a const char* or a const String&.
*
* Note also that despite the documentation, ArduinoJson does _not_ create a copy when assiging char* values:
*
* DEFINE_STRING_P(test, "This is a test value")
* json["test"] = _FS(test); // Doesn't work, we end up with garbage
* json["test"] = String(test); // OK
*
* Hopefully this will all be resolved in version 6.
*
* https://arduinojson.org/v5/api/jsonobject/subscript/
* https://arduinojson.org/v5/api/jsonobject/createnestedarray/
* https://arduinojson.org/v5/api/jsonobject/createnestedobject/
*
*/
JsonObjectKey(const FlashString& key) : _value(String(key).c_str()), _needs_copy(true) {}

const char* c_str() const { return _value; }
bool needs_copy() const { return _needs_copy; }

Expand Down
33 changes: 17 additions & 16 deletions Sming/Libraries/DS18S20/ds18s20.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "OneWire.h"
#include "ds18s20.h"


#define DEBUG_DS18S20


Expand All @@ -22,21 +21,24 @@



#define WORK_PIN 2 // default DS1820 on GPIO2, can be changed by Init
OneWire ds(WORK_PIN);


DS18S20::DS18S20()


DS18S20::DS18S20(uint8_t workPin /* = DS1820_WORK_PIN */)
{
ds = new OneWire(workPin);
}

DS18S20::~DS18S20()
{
delete ds;
ds = nullptr;
}

void DS18S20::Init(uint8_t pinOneWire)
{
ds.begin(pinOneWire);
ds->begin(pinOneWire);
InProgress=false;
}

Expand All @@ -47,8 +49,8 @@ void DS18S20::StartMeasure()

debugx(" DBG: DS1820 reading task start, try to read up to %d sensors",MAX_SENSORS);
InProgress=true;
ds.begin();
ds.reset_search();
ds->begin();
ds->reset_search();
DelaysTimer.initializeMs(150, TimerDelegate(&DS18S20::DoSearch, this)).start(false);
}

Expand All @@ -64,7 +66,7 @@ uint8_t DS18S20::FindAlladdresses()

while (counter++ < MAX_SENSORS)
{
if (!ds.search(addr))
if (!ds->search(addr))
{
debugx(" DBG: No more address found");
break;
Expand Down Expand Up @@ -132,7 +134,7 @@ void DS18S20::StartReadNext()
{
if (numberOf > numberOfread )
{
ds.reset();
ds->reset();

uint64_t tmp=addresses[numberOfread];
for (uint8_t a=0;a<8;a++)
Expand All @@ -141,8 +143,8 @@ void DS18S20::StartReadNext()
tmp=tmp>>8;
}

ds.select(addr);
ds.write(STARTCONVO, 1); // start conversion, with parasite power on at the end
ds->select(addr);
ds->write(STARTCONVO, 1); // start conversion, with parasite power on at the end

DelaysTimer.initializeMs(900, TimerDelegate(&DS18S20::DoMeasure, this)).start(false);
}
Expand All @@ -157,21 +159,20 @@ void DS18S20::StartReadNext()
}
}


void DS18S20::DoMeasure()
{

uint8_t present,i;
present = ds.reset();
ds.select(addr);
ds.write(READSCRATCH); // Read Scratchpad
present = ds->reset();
ds->select(addr);
ds->write(READSCRATCH); // Read Scratchpad

debugx(" DBG: T%d",numberOfread+1);

for ( i = 0; i < 9; i++)
{
// we need 9 bytes
data[i] = ds.read();
data[i] = ds->read();
}
debugx(" DBG: Data = %x %x %x %x %x %x %x %x %x %x CRC=%x",present,data[0],data[1],data[2],data[3],data[4],data[5],data[6],data[7],data[8],OneWire::crc8(data, 8));

Expand Down
6 changes: 5 additions & 1 deletion Sming/Libraries/DS18S20/ds18s20.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#define ALARMSEARCH 0xEC // Query for alarm
#define STARTCONVO 0x44 // temperature reading

#define DS1820_WORK_PIN 2 // default DS1820 on GPIO2, can be changed by Init

/** @brief Definition of callback function called on completion of measurement of all DS18S20 sensors
@note Example: void onMeasurment() { ... };
*/
Expand All @@ -41,7 +43,7 @@ class DS18S20
public:
/** @brief Instantiate a DS18S20 object
*/
DS18S20();
DS18S20(uint8_t workPin = DS1820_WORK_PIN);

/** @brief Initiate communication on 1-wire bus
* @param GPIO pin acting as 1-wire bus
Expand Down Expand Up @@ -127,6 +129,8 @@ class DS18S20


float celsius[MAX_SENSORS], fahrenheit[MAX_SENSORS];

OneWire* ds = nullptr;
};

/** @} */
Expand Down
82 changes: 0 additions & 82 deletions Sming/Libraries/IR/.github/CONTRIBUTING.md

This file was deleted.

Loading

0 comments on commit 19ce990

Please sign in to comment.