Browse code

Do not export meaningless values when the record is marked invalid

Natasha Kerensikova authored on08/04/2016 23:03:41
Showing1 changed files
... ...
@@ -227,6 +227,17 @@ minute_data_image(char *buffer, size_t size,
227 227
 		return 0;
228 228
 	}
229 229
 
230
+	if (data->is_invalid) {
231
+		int i = snprintf(buffer + ret, size - ret, ",,,,,,");
232
+
233
+		if (i <= 0) {
234
+			APP_LOG(APP_LOG_LEVEL_ERROR, "minute_data_image: "
235
+			    "Unexpected return value %d of snprintf (i)", i);
236
+			return 0;
237
+		}
238
+		return ret + i;
239
+	}
240
+
230 241
 	uint16_t yaw = data->orientation & 0xF;
231 242
 	uint16_t pitch = data->orientation >> 4;
232 243