updateClockFace static method

void updateClockFace(
  1. List<int> data,
  2. int idx
)

Implementation

static void updateClockFace(List<int> data, int idx) {
  final p = malloc<Int8>(data.length);
  for (var i = 0; i < data.length; i++) {
    p[i] = data[i] & 0xFF;
  }
  slog('开始表盘更新: $idx');
  updater = ClingBleUpdate.clockface();
  clingNative.cwsUpdateFileDownloadParams(
      "clockface.bin".toNativeUtf8(),
      "clockface_ok.txt".toNativeUtf8(),
      p as Pointer<Void>,
      data.length,
      idx);
  malloc.free(p);
  _checkFileDownloadState();
}