Skip to content

Commit

Permalink
Merge commit '93340e19a1e1e68885a36976113bc400eb2be985'
Browse files Browse the repository at this point in the history
* commit '93340e19a1e1e68885a36976113bc400eb2be985': (35 commits)
  Preparation for the final 3.3.0 release. (SmingHub#1202)
  Small fixes before the final 3.3.0 (SmingHub#1203)
  Updated the third-party modules.
  Added example demonstrating Js and CSS combining ... (SmingHub#1200)
  Fixed WebSocket sample HTML page (SmingHub#1201)
  Feature/auto deployment on release (SmingHub#1198)
  Handle incomplete frame to prevent WebsocketClient ending in an endless loop (SmingHub#1189)
  Fixes for styling issues reported by Codacy (SmingHub#1196)
  Feature/httpserver etag caching (SmingHub#1194)
  HttpServer tuning to allow serving of more requests. (SmingHub#1187)
  decode-stacktrace.py: Added python3 compatability. (SmingHub#1190)
  Release Candidate 1 for version 3.3.0. (SmingHub#1185)
  Station::waitConnection method was deprecated and is now removed. (SmingHub#1171)
  Adding fixes for issues reported by Vera++ and CppCheck. (SmingHub#1178)
  Changes related to POST parameter unescaping. (SmingHub#1177)
  Small fixes to comparison and memory related issues. (SmingHub#1172)
  Reset response and request data after completion.
  Custom PWM is enabled by default. (SmingHub#1164)
  TemplateStream: the total length should be calculated from the browser. HttpServer: The default keepalive time is set to 0.
  HttpClient: memory usage fixes. (SmingHub#1161)
  ...
  • Loading branch information
johndoe8967 committed Jul 28, 2017
2 parents efd9922 + 93340e1 commit 967f6f2
Show file tree
Hide file tree
Showing 174 changed files with 13,913 additions and 3,060 deletions.
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@
path = Sming/third-party/esp-open-lwip
url = https://github.com/pfalcon/esp-open-lwip.git
ignore = dirty
[submodule "Sming/third-party/http-parser"]
path = Sming/third-party/http-parser
url = https://github.com/nodejs/http-parser.git
ignore = dirty
[submodule "Sming/third-party/ws_parser"]
path = Sming/third-party/ws_parser
url = https://github.com/charliesome/ws_parser.git
ignore = dirty
23 changes: 19 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ language: cpp
env:
global:
- SDK_BUILD=258

- secure: Db9Cnv+oOmmQMm6aIf3H5VYHaas04uGOtvJMsq7NW05oyDVGCgV5FayjFPVzNHHgv85em1u1CPqX3p7eHWLSKMjARcEpLavXM31HW0RPxvserSpXI7f49EBi6ENgCPre4NGMWpdJgvIhmAfcEMwyLUBqRDmfH4KqqE8V5ZbhvacCbaD2cEOsPDjbkpA66VYp3srTmVUR4cC0ehUdg7odxVOWHaJbA068jJjwz/ggbYMkVljcFkjVHtZAIiZDN1vBGRWGwTjM4TMXwJmw07WumBwhZw6Qm7OShGfBTyg5/6Obqk1QZ///6BQCUD+bGhLlfEleEB48YJXwLD96HXgUwu/wZ7xWStQCWW5GQRPgXaufwZcc1TySJxaDeMhk90cIbUsjXGhmhV+rpM/5PMZTvpTOJbKrz2oY2qqFEZJGEYGoH24LHp4yPpAvQCmqjeLcQj/JiHeL9nKUy+mC3yOPLR/DOTa7t7zN8vuKqm0G0Af3DXXuum2kkzBgHFCNiiLedF2/7BVe/nAbOJLpuQwfVVOqpxIpTzKg05oPmjSsFPp4u03Yso3Kc6ulJQ354mYmnZD34jah5FaWo8YkGCmAGLIaqpcV62LCTSDK58ZMpEU1fy3jANlmktDQlaCUvniUo+c0mqmlstRpzGathb4u1nNHdgB/rjzDx64ug2MmllI=

matrix:
include:
- os: linux
Expand All @@ -18,16 +19,24 @@ addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'ppa:libreoffice/libreoffice-4-2'
packages:
- bsdtar
- doxygen
- doxygen-doc
- doxygen-latex
- doxygen-gui
- graphviz

install:
- if [ "$SDK_VERSION" != "2.0.0" ] && [ "$TRAVIS_OS_NAME" == "osx" ]; then export SDK_FILE_NAME="esp-alt-sdk-v${SDK_VERSION}.${SDK_BUILD}-macos-x86_64.zip"; fi
- if [ "$SDK_VERSION" != "2.0.0" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then export SDK_FILE_NAME="esp-alt-sdk-v${SDK_VERSION}.${SDK_BUILD}-linux-x86_64.tar.gz"; fi
- mkdir -p $TRAVIS_BUILD_DIR/opt/esp-alt-sdk
- if [ "$SDK_VERSION" != "2.0.0" ]; then wget https://bintray.com/artifact/download/kireevco/generic/${SDK_FILE_NAME}; fi
- if [ "$SDK_VERSION" != "2.0.0" ]; then bsdtar -xf ${SDK_FILE_NAME} -C $TRAVIS_BUILD_DIR/opt/esp-alt-sdk; fi
- if [ "$SDK_VERSION" == "2.0.0" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then wget https://github.com/nodemcu/nodemcu-firmware/raw/master/tools/esp-open-sdk.tar.xz; tar -Jxvf esp-open-sdk.tar.xz; ln -s `pwd`/esp-open-sdk/xtensa-lx106-elf $TRAVIS_BUILD_DIR/opt/esp-alt-sdk/. ; fi
- if [ "$SDK_VERSION" == "2.0.0" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then wget http://bbs.espressif.com/download/file.php?id=1690 -O sdk.zip; unzip sdk.zip; ln -s `pwd`/ESP8266_NONOS_SDK/ $TRAVIS_BUILD_DIR/opt/esp-alt-sdk/sdk; fi
- if [ "$SDK_VERSION" == "2.0.0" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then wget http://bbs.espressif.com/download/file.php?id=1690 -O sdk.zip; unzip sdk.zip; ln -s `pwd`/ESP8266_NONOS_SDK/ $TRAVIS_BUILD_DIR/opt/esp-alt-sdk/sdk; export DEPLOY='true'; fi

script:
- export CHANGED_FILES=`git diff --diff-filter=AMD HEAD HEAD^ --name-only`
- export CHANGED_PROJECTS=`for i in $CHANGED_FILES; do echo "$i" | grep '^samples/' | cut -d'/' -f2; done | uniq`
Expand All @@ -47,5 +56,11 @@ script:
- make clean samples-clean
- make ENABLE_CUSTOM_HEAP=1
- make Basic_Blink ENABLE_CUSTOM_HEAP=1
- make clean samples-clean
- make ENABLE_CUSTOM_LWIP=1; make samples ENABLE_CUSTOM_LWIP=1

deploy:
provider: script
script: sh $TRAVIS_BUILD_DIR/.travis/deploy.sh $TRAVIS_TAG
skip_cleanup: true
on:
tags: true
condition: $DEPLOY == true
29 changes: 29 additions & 0 deletions .travis/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
set -e # exit with nonzero exit code if anything fails

TAG=$1
if [ -z $TAG ]; then
echo "Usage:\n\t$0 <tag>\n";
exit 1;
fi


# Get information about the release
# TODO: ...

# Update documentation
cd $SMING_HOME
make docs
cd ..

git fetch origin gh-pages:gh-pages
git checkout gh-pages

DOCS_DIR=$SMING_HOME/../api

rm -rf $DOCS_DIR
cp -r $SMING_HOME/../docs/api/sming/ $DOCS_DIR
git add -A $DOCS_DIR
git commit -m "Updated the API docs to version $TAG." || 1

git push https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
24 changes: 14 additions & 10 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native develo
* Out of the box support for HTTP, MQTT and Websocket client connections over SSL.
* Out of the box support for OTA over HTTPS.
* [SNI](https://tools.ietf.org/html/rfc6066#page-6) and [Maximum Fragment Length](https://tools.ietf.org/html/rfc6066#page-8) SSL support.
* Optional alternative PWM support based on [Stefan Bruens PWM](https://github.com/StefanBruens/ESP8266_new_pwm.git)
* 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.

Expand All @@ -43,7 +43,7 @@ SDK = Software Development Kit
n/a = The selected SDK is not available on that OS

## Latest Stable Release
- [Sming V3.2.0](https://github.com/SmingHub/Sming/releases/tag/3.2.0)
- [Sming V3.3.0](https://github.com/SmingHub/Sming/releases/tag/3.3.0)

## Getting started
- [Windows](https://github.com/SmingHub/Sming/wiki/Windows-Quickstart)
Expand All @@ -58,20 +58,24 @@ n/a = The selected SDK is not available on that OS
## Optional features

<details><summary>There are multiple custom features that can be enabled by default. For example: SSL support, custom LWIP, open PWM, custom heap allocation, more verbose debugging, etc. Click here to see the details</summary><p>
- Custom LWIP:(default:ON) By default we are using custom compiled LWIP stack instead of the binary one provided from Espressif. This is increasing the free memory and decreasing the space on the flash. All espconn_* functions are turned off by default. If your application requires the use of some of the espconn_* functions then add the ENABLE_ESPCONN=1 directive. See `Makefile-user.mk` from the [Basic_SmartConfig](https://github.com/SmingHub/Sming/blob/develop/samples/Basic_SmartConfig/Makefile-user.mk#L41) application for examples. If you would like to use the binary LWIP then you should turn off the custom LWIP compilation by providing ENABLE_CUSTOM_LWIP=0.
- SSL:(default:off) The SSL support is not built-in by default to conserve resources. If you want to enable it then take a look at the [Readme](https://github.com/SmingHub/Sming/blob/develop/samples/Basic_Ssl/README.md) in the Basic_Ssl samples.
- Custom PWM:(default:off) If you want to use the [open PWM implementation](https://github.com/StefanBruens/ESP8266_new_pwm) then compile your application with ENABLE_CUSTOM_PWM=1. There is no need to recompile the Sming library.
- Custom serial baud rate: (default:off) The default serial baud rate is 115200. If you want to change it to a higher baud rate you can recompile Sming and your application changing the COM_SPEED_SERIAL directive. For example COM_SPEED_SERIAL=921600
- Custom Heap Allocation:(default:off) If your application is experiencing heap fragmentation then you can try the Umm Malloc heap allocation. To enable it compile Sming with ENABLE_CUSTOM_HEAP=1. In order to use it in your sample/application make sure to compile the sample with ENABLE_CUSTOM_HEAP=1. Avoid enabling your custom heap allocation AND -mforce-l32 compiler flag.
- Debug information log level and format: There are four debug levels: debug=3, info=2, warn=1, error=0. Using DEBUG_VERBOSE_LEVEL you can set the desired level (0-3). For example DEBUG_VERBOSE_LEVEL=2 will show only info messages and above. Another make directive is DEBUG_PRINT_FILENAME_AND_LINE=1 which enables printing the filename and line number of every debug line. This will require extra space on flash. Note: You can compile the Sming library with a set of debug directives and your project with another settings, this way you can control debugging sepparately for sming and your application code.
- Debug information for custom LWIP: If you use custom LWIP(see above) some debug information will be printed for critical errors and situations. You can enable debug information printing altogether using ENABLE_LWIPDEBUG=1. To increase debugging for certain areas you can modify debug options in third-party/esp-open-lwip/include/lwipopts.h
- CommandExecutor feature disabling. This feature enables execution of certain commands by registering token handlers for text received via serial, websocket or telnet connection. If this feature is not used additional RAM/Flash can be obtained by setting ENABLE_CMD_EXECUTOR=0. This will save ~1KB RAM and ~3KB of flash memory.

- Custom LWIP: (default: ON) By default we are using custom compiled LWIP stack instead of the binary one provided from Espressif. This is increasing the free memory and decreasing the space on the flash. All espconn_* functions are turned off by default. If your application requires the use of some of the espconn_* functions then add the ENABLE_ESPCONN=1 directive. See `Makefile-user.mk` from the [Basic_SmartConfig](https://github.com/SmingHub/Sming/blob/develop/samples/Basic_SmartConfig/Makefile-user.mk#L41) application for examples. If you would like to use the binary LWIP then you should turn off the custom LWIP compilation by providing `ENABLE_CUSTOM_LWIP=0`.
- SSL: (default: OFF) The SSL support is not built-in by default to conserve resources. If you want to enable it then take a look at the [Readme](https://github.com/SmingHub/Sming/blob/develop/samples/Basic_Ssl/README.md) in the Basic_Ssl samples.
- Custom PWM: (default: ON) If you don't want to use the [open PWM implementation](https://github.com/StefanBruens/ESP8266_new_pwm) then compile your application with `ENABLE_CUSTOM_PWM=0`. There is no need to recompile the Sming library.
- Custom serial baud rate: (default: OFF) The default serial baud rate is 115200. If you want to change it to a higher baud rate you can recompile Sming and your application changing the `COM_SPEED_SERIAL` directive. For example `COM_SPEED_SERIAL=921600`.
- Custom heap allocation: (default: OFF) If your application is experiencing heap fragmentation then you can try the [umm_malloc](https://github.com/rhempel/umm_malloc) heap allocation. To enable it compile Sming with `ENABLE_CUSTOM_HEAP=1`. In order to use it in your sample/application make sure to compile the sample with `ENABLE_CUSTOM_HEAP=1`. **Do not enable custom heap allocation and -mforce-l32 compiler flag together**.
- Debug information log level and format: There are four debug levels: debug=3, info=2, warn=1, error=0. Using `DEBUG_VERBOSE_LEVEL` you can set the desired level (0-3). For example `DEBUG_VERBOSE_LEVEL=2` will show only info messages and above. Another make directive is `DEBUG_PRINT_FILENAME_AND_LINE=1` which enables printing the filename and line number of every debug line. This will require extra space on flash. Note: you can compile the Sming library with a set of debug directives and your project with another settings, this way you can control debugging separately for Sming and your application code.
- Debug information for custom LWIP: If you use custom LWIP (see above) some debug information will be printed for critical errors and situations. You can enable debug information printing altogether using `ENABLE_LWIPDEBUG=1`. To increase debugging for certain areas you can modify debug options in `third-party/esp-open-lwip/include/lwipopts.h`.
- Interactive debugging on the device: (default: OFF) In order to be able to debug live directly on the ESP8266 microcontroller you should re-compile your application and the Sming library with `ENABLE_GDB=1` directive. See [Basic_Debug](https://github.com/SmingHub/Sming/tree/develop/samples/Basic_Debug) sample for more details.
- CommandExecutor feature: (default: ON) This feature enables execution of certain commands by registering token handlers for text received via serial, websocket or telnet connection. If this feature is not used additional RAM/Flash can be obtained by setting `ENABLE_CMD_EXECUTOR=0`. This will save ~1KB RAM and ~3KB of flash memory.

</p></details>

## Compilation and flashing
See the getting started page for your respective operating system.

You can find more information about compilation and flashing process by reading esp8266.com forum discussion thread.
Official ESP8266 documentation can be found in the [Espressif website](https://espressif.com/en/support/download/documents?keys=&field_type_tid%5B%5D=14).

## Examples
More information at **[Wiki Examples](https://github.com/SmingHub/Sming/wiki/examples)** page.
Expand Down
20 changes: 15 additions & 5 deletions Sming/Libraries/MCP23S17/MCP23S17.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ void MCP::wordWrite(uint8_t reg, unsigned int word)

void MCP::pinMode(uint8_t pin, uint8_t mode)
{ // Accept the pin # and I/O mode
if (pin < 0 | pin > 15)
if (pin > 15) {
return; // If the pin value is not valid (0-15) return, do nothing and return
}

if (mode == INPUT)
{ // Determine the mode before changing the bit state in the mode cache
_modeCache |= 1 << pin; // Since input = "HIGH", OR in a 1 in the appropriate place
Expand All @@ -132,8 +134,10 @@ void MCP::pinMode(unsigned int mode)

void MCP::pullupMode(uint8_t pin, uint8_t mode)
{
if (pin < 0 | pin > 15)
if (pin > 15) {
return;
}

if (mode == ON)
{
_pullupCache |= 1 << pin;
Expand All @@ -155,8 +159,10 @@ void MCP::pullupMode(unsigned int mode)

void MCP::inputInvert(uint8_t pin, uint8_t mode)
{
if (pin < 0 | pin > 15)
if (pin > 15) {
return;
}

if (mode == ON)
{
_invertCache |= 1 << pin;
Expand All @@ -178,8 +184,10 @@ void MCP::inputInvert(unsigned int mode)

void MCP::digitalWrite(uint8_t pin, uint8_t value)
{
if (pin < 0 | pin > 15)
if (pin > 15) {
return;
}

if (value)
{
_outputCache |= 1 << pin;
Expand Down Expand Up @@ -240,7 +248,9 @@ uint8_t MCP::byteRead(uint8_t reg)

uint8_t MCP::digitalRead(uint8_t pin)
{ // Return a single bit value, supply the necessary bit (1-16)
if (pin < 0 | pin > 15)
if (pin > 15) {
return 0x0; // If the pin value is not valid (1-16) return, do nothing and return
}

return digitalRead() & (1 << pin) ? HIGH : LOW; // Call the word reading function, extract HIGH/LOW information from the requested pin
}
2 changes: 1 addition & 1 deletion Sming/Libraries/RF24/tests/pingpair_blocking/runtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys,serial

def read_until(token):
while 1:
while 1:
line = ser.readline(None)
sys.stdout.write(line)

Expand Down
2 changes: 1 addition & 1 deletion Sming/Libraries/RF24/tests/pingpair_test/runtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys,serial

def read_until(token):
while 1:
while 1:
line = ser.readline(None,"\r")
sys.stdout.write(line)

Expand Down
46 changes: 34 additions & 12 deletions Sming/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ export COMPILE := gcc
export PATH := $(ESP_HOME)/xtensa-lx106-elf/bin:$(PATH)
XTENSA_TOOLS_ROOT := $(ESP_HOME)/xtensa-lx106-elf/bin

# select which tools to use as compiler, librarian and linker
AS := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
CC := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
CXX := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-g++
AR := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-ar
LD := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
OBJCOPY := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-objcopy
OBJDUMP := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-objdump

## COM port parameters
# Default COM port speed (generic)
COM_SPEED ?= 115200
Expand Down Expand Up @@ -143,7 +152,9 @@ TARGET = app
CUSTOM_TARGETS ?=

# which modules (subdirectories) of the project to include in compiling
MODULES = system system/helpers Wiring SmingCore appinit $(filter %/, $(wildcard SmingCore/*/)) $(filter %/, $(wildcard Services/*/)) $(filter %/, $(wildcard Libraries/*/))
MODULES = system system/helpers Wiring appinit \
$(sort $(dir $(wildcard SmingCore/*/ SmingCore/*/*/ SmingCore/*/*/*/))) \
$(filter %/, $(wildcard Services/*/)) $(filter %/, $(wildcard Libraries/*/))
EXTRA_INCDIR = include system/include Wiring Libraries SmingCore $(SDK_BASE)/../include

# Place a file that should exist in a submodule that is fetched separately
Expand All @@ -156,6 +167,16 @@ THIRD_PARTY_DATA += third-party/spiffs/makefile
MODULES += third-party/spiffs/src
EXTRA_INCDIR += third-party/spiffs/src

# => http-parser
THIRD_PARTY_DATA += third-party/http-parser/Makefile
MODULES += third-party/http-parser/
EXTRA_INCDIR += third-party/http-parser/

# => webscoket-parser
THIRD_PARTY_DATA += third-party/ws_parser/Makefile
MODULES += third-party/ws_parser/
EXTRA_INCDIR += third-party/ws_parser/

# => esp-gdbstub
ifeq ($(ENABLE_GDB), 1)
THIRD_PARTY_DATA += third-party/esp-gdbstub/Makefile
Expand Down Expand Up @@ -196,11 +217,14 @@ endif

# libraries used in this project, mainly provided by the SDK
LIBS = microc microgcc hal phy pp net80211 $(LIBLWIP) wpa main
# WARNING: In the next versions ENABLE_CUSTOM_PWM will be set to 1 by default

ENABLE_CUSTOM_PWM ?= 1
ifeq ($(ENABLE_CUSTOM_PWM), 1)
THIRD_PARTY_DATA += third-party/pwm/pwm.c
endif

MFORCE32 := $(shell $(CC) --help=target | grep mforce-l32)

# compiler flags using during compilation of source files. Add '-pg' for debugging
CFLAGS = -Wpointer-arith -Wundef -Werror -Wl,-EL -nostdlib -mlongcalls -mtext-section-literals -finline-functions -fdata-sections -ffunction-sections -D__ets__ -DICACHE_FLASH -DARDUINO=106 -DCOM_SPEED_SERIAL=$(COM_SPEED_SERIAL) -DENABLE_CMD_EXECUTOR=$(ENABLE_CMD_EXECUTOR)
ifeq ($(SMING_RELEASE),1)
Expand All @@ -212,7 +236,14 @@ else ifeq ($(ENABLE_GDB), 1)
else
CFLAGS += -Os -g
endif

ifneq ($(MFORCE32),)
# Your compiler supports the -mforce-l32 flag which means that
# constants can be stored in flash (program) memory instead of SRAM.
# See: https://www.arduino.cc/en/Reference/PROGMEM
CFLAGS += -DPROGMEM_L32="__attribute__((aligned(4))) __attribute__((section(\".irom.text\")))" -mforce-l32
else
CFLAGS += -DPROGMEM_L32=""
endif
#Append debug options
CFLAGS += -DCUST_FILE_BASE=$$* -DDEBUG_VERBOSE_LEVEL=$(DEBUG_VERBOSE_LEVEL) -DDEBUG_PRINT_FILENAME_AND_LINE=$(DEBUG_PRINT_FILENAME_AND_LINE)

Expand Down Expand Up @@ -246,15 +277,6 @@ ifeq ($(ENABLE_SSL),1)
CXXFLAGS += $(AXTLS_FLAGS)
endif

# select which tools to use as compiler, librarian and linker
AS := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
CC := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
CXX := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-g++
AR := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-ar
LD := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
OBJCOPY := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-objcopy
OBJDUMP := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-objdump

SRC_DIR := $(MODULES)
BUILD_DIR := $(addprefix $(BUILD_BASE)/,$(MODULES))

Expand Down
3 changes: 2 additions & 1 deletion Sming/Makefile-project.mk
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ ifeq ($(ENABLE_CUSTOM_LWIP), 1)
endif

LIBPWM = pwm
# WARNING: In the next versions ENABLE_CUSTOM_PWM will be set to 1 by default

ENABLE_CUSTOM_PWM ?= 1
ifeq ($(ENABLE_CUSTOM_PWM), 1)
LIBPWM = pwm_open
CUSTOM_TARGETS += $(USER_LIBDIR)/lib$(LIBPWM).a
Expand Down
3 changes: 2 additions & 1 deletion Sming/Makefile-rboot.mk
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ ifeq ($(ENABLE_CUSTOM_LWIP), 1)
endif

LIBPWM = pwm
# WARNING: In the next versions ENABLE_CUSTOM_PWM will be set to 1 by default

ENABLE_CUSTOM_PWM ?= 1
ifeq ($(ENABLE_CUSTOM_PWM), 1)
LIBPWM = pwm_open
CUSTOM_TARGETS += $(USER_LIBDIR)/lib$(LIBPWM).a
Expand Down
2 changes: 1 addition & 1 deletion Sming/Services/CommandProcessing/CommandExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CommandExecutor::CommandExecutor(Stream* reqStream) : CommandExecutor()
}
}

CommandExecutor::CommandExecutor(WebSocket* reqSocket)
CommandExecutor::CommandExecutor(WebSocketConnection* reqSocket)
{
commandOutput = new CommandOutput(reqSocket);
if (commandHandler.getVerboseMode() != SILENT)
Expand Down
2 changes: 1 addition & 1 deletion Sming/Services/CommandProcessing/CommandExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CommandExecutor
public:
CommandExecutor(TcpClient* cmdClient);
CommandExecutor(Stream* reqStream);
CommandExecutor(WebSocket* reqSocket);
CommandExecutor(WebSocketConnection* reqSocket);
~CommandExecutor();

int executorReceive(char *recvData, int recvSize);
Expand Down
4 changes: 3 additions & 1 deletion Sming/Services/CommandProcessing/CommandHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ CommandHandler::CommandHandler()

CommandHandler::~CommandHandler()
{
// TODO Auto-generated destructor stub
if(registeredCommands != NULL) {
delete registeredCommands;
}
}

void CommandHandler::registerSystemCommands()
Expand Down
2 changes: 1 addition & 1 deletion Sming/Services/CommandProcessing/CommandOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CommandOutput::CommandOutput(Stream* reqStream)
{
}

CommandOutput::CommandOutput(WebSocket* reqSocket)
CommandOutput::CommandOutput(WebSocketConnection* reqSocket)
: outputSocket(reqSocket)
{
}
Expand Down
Loading

0 comments on commit 967f6f2

Please sign in to comment.