updateAlmanac static method

void updateAlmanac(
  1. List<int> data
)

Implementation

static void updateAlmanac(List<int> data) {
  final p = malloc<Int8>(data.length);
  for (var i = 0; i < data.length; i++) {
    p[i] = data[i] & 0xFF;
  }
  slog('开始Almanac更新');
  updater = ClingBleUpdate.almanac();
  clingNative.cwsUpdateFileDownloadParams(
      "almanac.bin".toNativeUtf8(),
      "almanac_fail.txt".toNativeUtf8(),
      p as Pointer<Void>,
      data.length,
      101);
  malloc.free(p);
  _checkFileDownloadState();
}