updated naming

This commit is contained in:
Nick Leeman 2021-03-30 00:05:34 +02:00
parent 4ba8332404
commit a89791f251
5 changed files with 33 additions and 7 deletions

View File

@ -1,3 +1,29 @@
# SimpleSerialProtocol
# Simple Serial Protocol (SSP)
Simple Serial Protocol (SSP) for arduino devices.
SSP is a easy-to-use serial protocol system for arduino type devices.
## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install foobar.
```bash
pip install foobar
```
## Usage
```python
import foobar
foobar.pluralize('word') # returns 'words'
foobar.pluralize('goose') # returns 'geese'
foobar.singularize('phenomena') # returns 'phenomenon'
```
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
## License
[MIT](https://choosealicense.com/licenses/mit/)

View File

@ -1,6 +1,6 @@
{
"name": "SimpleSerialProtocol",
"version": "1.0.0",
"version": "1.1.0",
"description": "Easy-to-use serial protocol system for arduino type devices.",
"keywords": "Serial, Connectivity, USB, Simple",
"repository":

View File

@ -24,7 +24,7 @@
#include "Packet.h"
#include "SerialConnection.h"
class SSPDevice
class SimpleSerialProtocol
{
private:
SerialConnection serialConnection;
@ -34,7 +34,7 @@ class SSPDevice
bool sendPacket(char* ID, char* command, char* data);
};
bool SSPDevice::init(int deviceIndex, unsigned long baud) {
bool SimpleSerialProtocol::init(int deviceIndex, unsigned long baud) {
// Check if device index is in range
if (deviceIndex < 0 || deviceIndex > 4) {
return false;
@ -49,7 +49,7 @@ bool SSPDevice::init(int deviceIndex, unsigned long baud) {
return true;
};
bool SSPDevice::receivePackets(void (*callback)(Packet)) {
bool SimpleSerialProtocol::receivePackets(void (*callback)(Packet)) {
// Try to get buffer from serial device
char* receivedBuffer = serialConnection.handle();
@ -92,7 +92,7 @@ bool SSPDevice::receivePackets(void (*callback)(Packet)) {
return false;
};
bool SSPDevice::sendPacket(char* ID, char* command, char* data) {
bool SimpleSerialProtocol::sendPacket(char* ID, char* command, char* data) {
// Create new packet buffer
char serialPacketBuffer[serialConnection.getBufferSize()];