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

use arduinoJson for fields #216

Merged
merged 17 commits into from
Dec 3, 2021

Commits on Nov 17, 2021

  1. Configuration menu
    Copy the full SHA
    422e4e3 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2021

  1. Configuration menu
    Copy the full SHA
    68f7350 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    939936e View commit details
    Browse the repository at this point in the history
  3. formatting change only

    henrygab committed Nov 20, 2021
    Configuration menu
    Copy the full SHA
    2152074 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2021

  1. Use ArduinoJSON to reduce heap fragmentation

    Use a pre-allocated DynamicJsonDocument to more
    easily create the JSON structure.  As a nice side
    effect, it also performs only two allocations:
    One for the DynamicJsonDocument,
    One for  `result.reserve()` call.
    
    The old function had 28 lines of the form:
    `(String)json += "foo" + (String)bar() + ","`
    
    Each line creates three temporary String objects:
    (e.g., "foo", result from bar()), ",").  It then appends
    "foo" + "bar" (often another allocation), then appends
    the trailing close-quote and comma (unlikely, but
    potentially another allocation).  Finally, the first
    temporary variable (now "foo : bar,") is appended
    to the current final result string (28 allocations).
    henrygab committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    a082480 View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2021

  1. namespace and enum for field type

    The anonymous/unnamed namespace ensures no
    unintended pollution of the global namespace,
    and makes clear what the external API for this file
    contains.  This makes it much easier to change
    the underlying implementation, as it's guaranteed
    that changes internal to the namespace won't
    break other source files.
    
    Use of a scoped enum for field type enables compiler warnings.
    Specifically, use of a `switch` statement with no `default` case
    will generate a compiler warning/error if missing any values.
    
    Tested to generate 100% identical JSON on Fib256.
    henrygab committed Nov 25, 2021
    Configuration menu
    Copy the full SHA
    64d66a1 View commit details
    Browse the repository at this point in the history
  2. Add and use JSON converter function for Field

    Confirmed identical JSON output for at least Fib256.
    henrygab committed Nov 25, 2021
    Configuration menu
    Copy the full SHA
    fc7cd56 View commit details
    Browse the repository at this point in the history
  3. arduinoJson used for palettes and patterns

    Verified identical JSON output on at least Fib256.
    henrygab committed Nov 25, 2021
    Configuration menu
    Copy the full SHA
    a5c21e2 View commit details
    Browse the repository at this point in the history
  4. Merge UTC Offset changes

    henrygab committed Nov 25, 2021
    Configuration menu
    Copy the full SHA
    63df7f3 View commit details
    Browse the repository at this point in the history
  5. Indentation only.

    henrygab committed Nov 25, 2021
    Configuration menu
    Copy the full SHA
    ca2a307 View commit details
    Browse the repository at this point in the history
  6. More indentation

    henrygab committed Nov 25, 2021
    Configuration menu
    Copy the full SHA
    a18e950 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2021

  1. Make namespace anonymous

    henrygab committed Nov 26, 2021
    Configuration menu
    Copy the full SHA
    c147d83 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    942a8a6 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2021

  1. Configuration menu
    Copy the full SHA
    ba9c743 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7f61d0f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    540693d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f50d34e View commit details
    Browse the repository at this point in the history