Skip to content

Storage and Logging #37

Description

@samuelnguyen999

Data is currently handled across both the EEPROM and device classes. Choose a single storage approach and rename classes to reflect clear ownership. Implement a centralized logging system (Serial or alternatives) and apply it consistently across device actions.

Related articles

For exmaple set highpoint cali in pH probe

def set_highpoint_calibration(self, highpoint):
        """
        Set the highpoint calibration value for the pH probe.
        """
        self.slope_is_out_of_range = False
        self.eeprom.set_ignore_bad_ph_slope(False)
        self._highpoint_calibration = highpoint
        buffer = f"Cal,High,{int(highpoint)}.{int(highpoint * 1000 + 0.5) % 1000}\r"
        print(buffer)  # Simulate sending the string to the Atlas Scientific product
        print(
            f"PHProbe::setHighpointCalibration({int(highpoint)}.{int(highpoint * 1000) % 1000})"
        ) 

vs cpp
serial(F("PHProbe::setHighpointCalibration(%i.%03i)"), (int)highpoint, (int)(highpoint * 1000) % 1000);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions