From 46be66c0639032c8ebf222f79e3a52b2b120ad24 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Thu, 11 Aug 2016 11:34:51 +0500 Subject: - Enabled IgnitionEventHandler in pipeline - Added motorHours to SummaryReport - Added ignition to test-generator.py --- tools/test-generator.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/test-generator.py b/tools/test-generator.py index 41a32a565..0b8e4113c 100755 --- a/tools/test-generator.py +++ b/tools/test-generator.py @@ -32,10 +32,12 @@ for i in range(0, len(waypoints)): lon = lon1 + (lon2 - lon1) * j / count points.append((lat, lon)) -def send(conn, lat, lon, course, alarm): +def send(conn, lat, lon, course, alarm, ignition): params = (('id', id), ('timestamp', int(time.time())), ('lat', lat), ('lon', lon), ('bearing', course)) if alarm: params = params + (('alarm', 'sos'),) + if ignition: + params = params + (('ignition', 'true'),) conn.request('GET', '?' + urllib.urlencode(params)) conn.getresponse().read() @@ -56,6 +58,7 @@ while True: (lat1, lon1) = points[index % len(points)] (lat2, lon2) = points[(index + 1) % len(points)] alarm = ((index % 10) == 0) - send(conn, lat1, lon1, course(lat1, lon1, lat2, lon2), alarm) + ignition = ((index % len(points)) != 0) + send(conn, lat1, lon1, course(lat1, lon1, lat2, lon2), alarm, ignition) time.sleep(period) index += 1 -- cgit v1.2.3