修复初始化配置文件的一处bug

This commit is contained in:
CSSC-WORK\murmur 2023-09-10 18:22:08 +08:00
parent 8bd7f5b0e9
commit 3df0e5d026

View File

@ -155,7 +155,7 @@ void initFiles()
const char *cfgstr =
"{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{},\"geometry\":{\"coordinates\":[[[109.85768145990244,18.422149049902515],[109.85578152088834,18.418353201926465],[109.86089674131063,18.41424527209267],[109.86531775324693,18.418387867583846],[109.86491584307038,18.421785068111333],[109.85768145990244,18.422149049902515]]],\"type\":\"Polygon\"}}]}";
LOG_W("no map file found, creat map one.");
int fd = open(LJW_CFG_FILE_NAME, O_WRONLY | O_CREAT);
int fd = open("map.geojson", O_WRONLY | O_CREAT);
if (fd > 0) {
write(fd, cfgstr, strlen(cfgstr));
close(fd);