mcci-catena / Catena-Arduino-Platform

Arduino platform library for MCCI Catena IoT Systems
MIT License
12 stars 11 forks source link

FRAM: cFram::Cursor::saveField() doesn't return error status or log problems #309

Open terrillmoore opened 3 years ago

terrillmoore commented 3 years ago

This is for the future FRAM scrub. saveField() needs to change to bool and do more logging, e.g.,

    bool rc;

    rc = true;
        if (! cursor.create())
                {
                gLog.printf(gLog.kError,
                        "%s: can't save uKey(0x%x) %u bytes\n",
                        __func__, uKey, nValue
                        );
        rc = false;
                }

        if (! cursor.put(pValue, nValue))
        {
        gLog.printf(gLog.kError, "%s: can't put uKey(0xx) %u bytes\n",
            __func__, uKey, nValue
            );
        rc = false;
        }

    return rc;