| | |
| | | using namespace std; |
| | | |
| | | #define ID_SM_NDK_START 0x0001 |
| | | #define ID_MS_NDK_ACK 0x8001 |
| | | #define ID_SM_REQ_RTK_PLAT_CFG 0x0002 |
| | | #define ID_MS_RTK_PLAT_CFG 0x8002 |
| | | #define ID_SM_RTK_PLAT_CONN 0x0003 |
| | |
| | | #define ID_SM_ENTER_MAP 0x000D |
| | | #define ID_SM_CAR 0x000E |
| | | |
| | | static int OnOff = 0; |
| | | static int OnOff = 0xFFFF; |
| | | |
| | | void MA_NdkStart(void) |
| | | { |
| | |
| | | if (map_index == 0) { |
| | | int i = 0, j = 0; |
| | | pointNum = s2.Size()/2; |
| | | map = new double[pointNum][2]; |
| | | map = (double (*)[2]) new double[pointNum][2]; |
| | | // map = (double (*)[2]) malloc(pointNum * 2 * sizeof(double)); |
| | | |
| | | for (Value::ConstValueIterator itr3 = s2.Begin(); |
| | | itr3 != s2.End(); ++itr3) { |
| | | map[i][j] = (*itr3).GetDouble(); |
| | |
| | | } else if (map_index == 1) { |
| | | int i = 0, j = 0; |
| | | point2Num = s2.Size()/2; |
| | | map2 = new double[s2.Size()][2]; |
| | | map2 = (double (*)[2]) new double[s2.Size()][2]; |
| | | // map2 = (double (*)[2]) malloc(point2Num * 2 * sizeof(double)); |
| | | |
| | | for (Value::ConstValueIterator itr3 = s2.Begin(); |
| | | itr3 != s2.End(); ++itr3) { |
| | | map2[i][j] = (*itr3).GetDouble(); |
| | |
| | | if (s.IsArray()) { |
| | | int i = 0, j = 0; |
| | | pointNum = s.Size()/2; |
| | | point = new double[pointNum][2]; |
| | | point = (double (*)[2]) new double[pointNum][2]; |
| | | // point = (double (*)[2])malloc(pointNum * 2 * sizeof(double)); |
| | | |
| | | for(Value::ConstValueIterator itr = s.Begin(); itr != s.End(); ++itr) { |
| | | point[i][j] = itr->GetDouble(); |
| | |
| | | if (a.IsArray() && a.Size() > 0) { |
| | | int n = a.Size(); |
| | | int i = 0; |
| | | int (*sensor)[2] = new int[n][2]; |
| | | int (*sensor)[2] = (int (*)[2]) new int[n][2]; |
| | | |
| | | for (Value::ConstValueIterator itr = a.Begin(); itr != a.End(); ++itr) { |
| | | // a gpio mapping |