Skip to content

Commit

Permalink
clean up some missed things
Browse files Browse the repository at this point in the history
  • Loading branch information
ian612 committed Nov 15, 2023
1 parent f94d851 commit 80c1b7b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
6 changes: 1 addition & 5 deletions scripts/command_response_test/command_response_test.ino
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ void setup() {

// Use a higher data rate because the VS Code serial monitor uses 115200 as default
Serial.begin(115200);
// Set timeout to a low number so responses are quick
Serial.setTimeout(50);
}

Expand All @@ -45,11 +46,6 @@ void debugMessage(String msg1, String msg2) {
}
}

// Primary parsing function
void parse(String s) {

}

// main loop
void loop() {
if (Serial.available())
Expand Down
2 changes: 1 addition & 1 deletion scripts/dead_reckoning.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def bytes_to_list(msg):
# Set whether to use TCP (SimMeR) or serial (Arduino)
SIMULATE = True

# Pause time
# Time to pause after transmitting (seconds)
TRANSMIT_PAUSE = 0.1

### Network Setup ###
Expand Down
13 changes: 11 additions & 2 deletions scripts/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,19 @@ def receive():

def bytes_to_list(msg):
num_responses = int(len(msg)/4)
data = struct.unpack("%sf" % str(num_responses), msg)
return data
if num_responses:
data = struct.unpack(f'{str(num_responses)}f', msg)
return data
else:
return ([False])


# Set whether to use TCP (SimMeR) or serial (Arduino)
SIMULATE = True

# Time to pause after transmitting (seconds)
TRANSMIT_PAUSE = 0.1

### Network Setup ###
HOST = '127.0.0.1' # The server's hostname or IP address
PORT_TX = 61200 # The port used by the *CLIENT* to receive
Expand Down

0 comments on commit 80c1b7b

Please sign in to comment.