Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General cleanup and refactoring in preparation for batch transmission #434

Merged
merged 11 commits into from
Sep 14, 2023

Commits on Apr 11, 2023

  1. Configuration menu
    Copy the full SHA
    fd02919 View commit details
    Browse the repository at this point in the history
  2. publishers: fix undefined behavior in response code processing

    Correctly initialize response code variable terminator.
    tpwrules committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    55973fa View commit details
    Browse the repository at this point in the history
  3. dataPublisherBase: remove redundant zero init of TX buffer

    Saves 750 bytes of flash as the buffer can be placed in .bss to be
    zero-initialized instead of .data.
    tpwrules committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    507b317 View commit details
    Browse the repository at this point in the history
  4. LoggerBase: optimize setFileTimestamp

    Saves ~110 bytes of flash and substantial stack
    tpwrules committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    83b27ea View commit details
    Browse the repository at this point in the history
  5. LoggerModem: optimize CSQ conversion functions

    Saves ~200 bytes of RAM and ~360 bytes of flash.
    
    The equations reproduce the tables previously found in the source code
    exactly. The reason for the values in the original tables is unknown.
    tpwrules committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    f0d2637 View commit details
    Browse the repository at this point in the history
  6. LoggerBase: always power down modem after RTC sync

    The test for "15 seconds before the next logging interval" has been wrong
    for years, possibly since this code was written, with no apparent
    consequence. The behavior is additionally confusing to users deploying the
    devices and causes problems with logging as the modem won't get turned
    off for a long time.
    
    Remove it completely to solve the problems.
    tpwrules committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    2692821 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    389c162 View commit details
    Browse the repository at this point in the history
  8. publishers: refactor transmit buffer usage

    Use cleaner interface and common functions that avoid repeated snprintf
    and strlen usage to save ~2.5KB of flash and dozens of lines of code.
    
    Removes extra \r\n from HTTP requests as a side effect, which were against
    spec and caused spurious 400 Bad Request status messages from servers.
    tpwrules committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    493215d View commit details
    Browse the repository at this point in the history
  9. dataPublisherBase: widen sendEveryX and ditch sendOffset

    sendEveryX will be used in the future for data buffering functionality. Increase
    its width to an int to allow larger buffers when desired.
    
    Delete sendOffset completely as there is little reason for that particular
    functionality. The offset will be in effect set randomly using the time the
    datalogger initially powers on.
    tpwrules committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    2c87ff0 View commit details
    Browse the repository at this point in the history
  10. publishers: remove hearsay about logger construction order

    The C++ standard specifies that all objects in the same translation unit
    (i.e. source file) are constructed in order of declaration. Since this is
    the most common case when using Modular Sensors, the described case cannot
    occur.
    tpwrules committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    f83a96f View commit details
    Browse the repository at this point in the history
  11. update changelog

    tpwrules committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    d82635e View commit details
    Browse the repository at this point in the history