//
// Created by villuton on 16.09.2025.
//

#include "DataFlashPrivate.h"

void DeviceStorageInitDeviceSettings(tDeviceSettings *env) {
    String16CopyStatic(&env->serialNumber.value, "Нет ID!");
    env->serialNumber.writeAccess = 1;

    env->dividerRatio = STORAGE_V_DIVIDER_RATIO_DEFAULT;
    env->vReference = STORAGE_V_REFERENCE_DEFAULT;
    env->voltageBatteryConnectThreshold = STORAGE_V_BAT_CONNECT;
    env->voltageBatteryLoadedThreshold = STORAGE_V_BAT_LOADED;

    for(uint8_t i = CHRG_Ch1; i < STORAGE_CALIB_CHANEL_NUM; i++){
        env->chanelCalibrationFactor[i] = STORAGE_CALIBRATION_FACTOR_DEFAULT;
    }
}