Subject | Hash | Author | Date (UTC) |
---|---|---|---|
TrafficLights working..? | 7f12d9c9d44a2fa556d15e075723ec9c11c8b468 | Jan Allersma | 2017-12-19 15:22:32 |
Add lights and fully working train. | ee0e851a1b482f162918f8723fc0c62d257aff83 | Jan Allersma | 2017-12-18 16:59:33 |
Commit after fixing issues during lecture | 93b7f5e88a7a4427867054ebabe0505963b14da0 | Jan Allersma | 2017-12-13 12:49:55 |
Some more fixes :D | 09f121a8de8ef6f49abbf0a52b0e9d9c033ade58 | Jan Allersma | 2017-12-09 15:09:38 |
Also added additional waypoints for 106. | 1567c42fbaa689848d2ca2620e37bb83bb30eaf4 | Jan Allersma | 2017-12-07 13:40:56 |
Fixed some bugs (See TestResultsSimulator.txt for more info). | 7c4466770f8b4da0af1156856a40b32cd11b6d37 | Jan Allersma | 2017-12-07 13:31:04 |
Werk van Simulator na testen 05/12/17. | 80af7ffb5438b855a2e73fb185ba66c1cd50efe3 | Jan Allersma | 2017-12-05 09:45:11 |
Nieuwe plattegrond toegevoegd. | b520f51bdd4a4d25e5d1a54cd094cf3b4632a369 | Jan Allersma | 2017-12-02 14:19:52 |
More Waypoints! | 465108ac6a127bbda26b40989fd6a68cd3e00aad | Jan Allersma | 2017-11-30 12:52:22 |
Added voetganger. | dad12c3d2eb2a7160838c3495e4a7a2d382e493f | Jan Allersma | 2017-11-30 12:32:35 |
Added all waiting waypoints for 1xx. | bbba002738e0a26b085673400c76329d3055d8ba | Jan Allersma | 2017-11-29 12:00:37 |
Simulation now working correctly for ID's 101, 102 and 103. | 1bc2fb65bb75b3a1f63cf7690472152fe1f32564 | Jan Allersma | 2017-11-28 16:22:53 |
Autos kunnen gespawned worden en rijden dan de goede richting op. | b36ef1cafeda20d5753b72c6f8e6ac8423c42d95 | Jan Allersma | 2017-11-26 21:44:39 |
Last changes before test case 5. | 258ba4735dfd2078f8e4f034fffed2bbbb086f2a | Jan Allersma | 2017-11-22 14:08:37 |
hallo dit is kapot maar het werkt woehoe | 4475c2633e962688c71634d633ac8789524f16cf | XCBouke | 2017-11-22 13:58:54 |
It's actually working now! With a gameloop and new icons :D | 0b65d450fea6d9f679029f2d6765c7e2d1126cdd | Jan Allersma | 2017-11-20 22:02:23 |
Something... Works?? | 9a6afe028642b571483fccd6d6bdab10dee68e9c | Jan Allersma | 2017-11-20 15:14:07 |
User input for sending msg. | cdd1c17cfe8cc73985945aad5878e4891e92eab1 | Jan Allersma | 2017-11-14 23:05:53 |
prutsen veel prusten | f37cf730ff7a0ad2e08cd769da5f488051ac6dd4 | XCBouke | 2017-11-09 21:32:15 |
uglyJsonCode created online with Bitbucket | ed6c9c541947ec64827b6e80ed959feb1b0f9b85 | XCBouke | 2017-11-09 14:29:36 |
File | Lines added | Lines deleted |
---|---|---|
simulatie/pyg.py | 14 | 9 |
simulatie/test/connection.py | 43 | 3 |
simulatie/test/model.py | 1 | 1 |
File simulatie/pyg.py changed (mode: 100644) (index 03206e6..244cdc7) | |||
... | ... | class Light(object): | |
31 | 31 | ||
32 | 32 | def lightCheck(self): | def lightCheck(self): |
33 | 33 | self.lamp_tint = self.lamp.copy() | self.lamp_tint = self.lamp.copy() |
34 | if tm.lights[self.lightIndex]['Status'] == 0: # ROOD | ||
35 | self.lamp_tint.fill((250, 0, 0), None, pygame.BLEND_RGB_MULT) | ||
36 | elif tm.lights[self.lightIndex]['Status'] == 1: # ORANJE | ||
37 | self.lamp_tint.fill((250, 100, 0), None, pygame.BLEND_RGB_MULT) | ||
38 | elif tm.lights[self.lightIndex]['Status'] == 2: # GROEN | ||
39 | self.lamp_tint.fill((0, 250, 0), None, pygame.BLEND_RGB_MULT) | ||
40 | else: | ||
41 | print("Light color undefined: ") | ||
42 | print(tm.lights[self.lightIndex]['Status']) | ||
34 | |||
35 | try: | ||
36 | if tm.lights[self.lightIndex]['Status'] == 0: # ROOD | ||
37 | self.lamp_tint.fill((250, 0, 0), None, pygame.BLEND_RGB_MULT) | ||
38 | elif tm.lights[self.lightIndex]['Status'] == 1: # ORANJE | ||
39 | self.lamp_tint.fill((250, 100, 0), None, pygame.BLEND_RGB_MULT) | ||
40 | elif tm.lights[self.lightIndex]['Status'] == 2: # GROEN | ||
41 | self.lamp_tint.fill((0, 250, 0), None, pygame.BLEND_RGB_MULT) | ||
42 | else: | ||
43 | print("Special signal") | ||
44 | self.lamp_tint.fill((0, 250, 0), None, pygame.BLEND_RGB_MULT) | ||
45 | except: | ||
46 | print(str(self.lightIndex) + "/" + str(len(tm.lights))) | ||
47 | |||
43 | 48 | ||
44 | 49 | screen.blit(self.lamp_tint, self.rect) | screen.blit(self.lamp_tint, self.rect) |
45 | 50 |
File simulatie/test/connection.py changed (mode: 100644) (index cdc4e25..6a08a9e) | |||
... | ... | def callback(ch, method, prop, body): | |
73 | 73 | }, | }, |
74 | 74 | { | { |
75 | 75 | "Id": 201, | "Id": 201, |
76 | "Status": 4, | ||
76 | "Status": 2, | ||
77 | 77 | "Time": -1 | "Time": -1 |
78 | 78 | }, | }, |
79 | 79 | { | { |
... | ... | def callback(ch, method, prop, body): | |
131 | 131 | "Status": 0, | "Status": 0, |
132 | 132 | "Time": -1 | "Time": -1 |
133 | 133 | }, | }, |
134 | { | ||
135 | "Id": 407, | ||
136 | "Status": 0, | ||
137 | "Time": -1 | ||
138 | }, | ||
139 | { | ||
140 | "Id": 408, | ||
141 | "Status": 0, | ||
142 | "Time": -1 | ||
143 | }, | ||
144 | { | ||
145 | "Id": 409, | ||
146 | "Status": 0, | ||
147 | "Time": -1 | ||
148 | }, | ||
149 | { | ||
150 | "Id": 410, | ||
151 | "Status": 0, | ||
152 | "Time": -1 | ||
153 | }, | ||
154 | { | ||
155 | "Id": 411, | ||
156 | "Status": 0, | ||
157 | "Time": -1 | ||
158 | }, | ||
159 | { | ||
160 | "Id": 412, | ||
161 | "Status": 0, | ||
162 | "Time": -1 | ||
163 | }, | ||
164 | { | ||
165 | "Id": 501, | ||
166 | "Status": 0, | ||
167 | "Time": -1 | ||
168 | }, | ||
169 | { | ||
170 | "Id": 502, | ||
171 | "Status": 0, | ||
172 | "Time": -1 | ||
173 | }, | ||
134 | 174 | { | { |
135 | 175 | "Id": 601, | "Id": 601, |
136 | 176 | "Status": 2, | "Status": 2, |
137 | 177 | "Time": -1 | "Time": -1 |
138 | 178 | } | } |
139 | 179 | ] | ] |
140 | }, sort_keys=True, indent=4, separators=(',',': ')) | ||
180 | }, sort_keys=False, indent=4, separators=(',',': ')) | ||
141 | 181 | ||
142 | 182 | sendMsg(msg) | sendMsg(msg) |
143 | 183 | ||
... | ... | def sendMsg(msg): | |
148 | 188 | body=msg | body=msg |
149 | 189 | ) | ) |
150 | 190 | print('Msg sent.') | print('Msg sent.') |
151 | |||
191 | print(msg) | ||
152 | 192 | def listen(): | def listen(): |
153 | 193 | print('Waiting for a sign..') | print('Waiting for a sign..') |
154 | 194 | recieve.basic_consume ( | recieve.basic_consume ( |
File simulatie/test/model.py changed (mode: 100644) (index beb8a8f..c505dcc) | |||
1 | 1 | # Jan Allersma: groep 8. Maakt simulator. | # Jan Allersma: groep 8. Maakt simulator. |
2 | 2 | uname = 'softdev' | uname = 'softdev' |
3 | 3 | passwd = 'softdev' | passwd = 'softdev' |
4 | vhost = '/8' | ||
4 | vhost = '/11' | ||
5 | 5 | host = '127.0.0.1'#'141.252.237.17' | host = '127.0.0.1'#'141.252.237.17' |
6 | 6 | ||
7 | 7 | recieveQueue = 'controller' | recieveQueue = 'controller' |