hologram-io / hologram-python

Hologram device-side Python SDK - Send messages to the cloud in just 3 lines of code!
https://hologram.io/
MIT License
89 stars 47 forks source link

Strip AT command result prefix when issued command ends with ? or % #6

Closed TomPethtel closed 3 years ago

TomPethtel commented 6 years ago

When issuing an AT command to the modem which ends in a ? or %, the prefix of the result may not contain the last character, which prevents existing stripping logic from working. For example, +CREG? might return something like CREG: 2,1,"11BE","D787762",6. With this PR, Modem._basic_command will instead return 2,1,"11BE","D787762",6, the raw data, consistent with what is returned for commands without the ? or %.