Skip to content

Commit

Permalink
Minor change in Makefile, updated HISTORY and README docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrej1024 committed Aug 30, 2016
1 parent 956689e commit 0cd3999
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
6 changes: 6 additions & 0 deletions HISTORY
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,9 @@ Version history
0.10: 11/04/2016
- Added support for SainSmart 16 Channel controller USB HID Programmable Control Relay Module
- Cleanup patches

0.10.1: 30/08/2016 (Bugfix release)
- Fixed compatibility issue with PiRelay app
- Added "-D" option for daemon mode ("-D" sends crelay to backgound, "-d" leaves crelay in foregraound)
- Modified file stream handling as temporary workaround for web server connection issue on some systems (OpenWRT)
- Added LDFLAGS parameter to linger command in Makefile (needed by OpenWRT)
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ The following picture shows a high level view on the modular software architectu
<br>

### HTTP API
An HTTP API is provided to access the server from external clients. This API is compatible with the [PiRelay Android app](https://play.google.com/store/apps/details?id=com.jasonfindlay.pirelay). Therefore the app can be used on your Android phone to control *crelay* remotely.
I am also considering to add a more universally usable Json format based API in the future.
An HTTP API is provided to access the server from external clients. This API is compatible with the PiRelay Android app. Therefore the app can be used on your Android phone to control *crelay* remotely.

Note: *the author of this app seems to have removed the free version of the app from the Google Play Store (leaving only the PRO version).
For this reason and the fact that PiRelay is not open source I am considering to develop a dedicated crelay Android app. This will use a more universal Json format based API. Any volunteers who want to contribute to this app are very welcome.*

- API url:
<pre><i>ip_address[:port]</i>/gpio</pre>
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ all: $(BIN)

$(BIN): $(OBJ)
@echo "[Link $(BIN)] with libs $(LIBS)"
@$(CC) -o $(BIN) $(OBJ) $(LIBS)
@$(CC) -o $(BIN) $(OBJ) $(LDFLAGS) $(LIBS)

.c.o:
@echo "[Compile $<]"
Expand Down
5 changes: 2 additions & 3 deletions src/crelay.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Description:
* This software is used to controls different type of relays cards.
* There are 3 ways to control the relais:
* There are 3 ways to control the relays:
* 1. via command line
* 2. via web interface using a browser
* 3. via HTTP API using a client application
Expand All @@ -17,7 +17,7 @@
* sudo make install
*
* Last modified:
* 11/08/2016
* 30/08/2016
*
* Copyright 2016, Ondrej Wisniewski
*
Expand Down Expand Up @@ -728,7 +728,6 @@ int main(int argc, char *argv[])

/* Wait for request from web client */
s = accept(sock, NULL, NULL);
printf("s=%d\n", s);
if (s < 0) break;

/* Process request */
Expand Down

0 comments on commit 0cd3999

Please sign in to comment.