debugging

pull/1/head
Julius Riegel 7 years ago
parent 14f7c7854c
commit 105bfdf1d7

@ -29,8 +29,8 @@
<file leaf-file-name="main.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/main.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="355">
<caret line="42" column="23" lean-forward="false" selection-start-line="42" selection-start-column="23" selection-end-line="42" selection-end-column="23" />
<state relative-caret-position="304">
<caret line="40" column="28" lean-forward="false" selection-start-line="40" selection-start-column="28" selection-end-line="40" selection-end-column="28" />
<folding>
<element signature="e#0#19#0" expanded="true" />
</folding>
@ -466,8 +466,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/main.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="355">
<caret line="42" column="23" lean-forward="false" selection-start-line="42" selection-start-column="23" selection-end-line="42" selection-end-column="23" />
<state relative-caret-position="304">
<caret line="40" column="28" lean-forward="false" selection-start-line="40" selection-start-column="28" selection-end-line="40" selection-end-column="28" />
<folding>
<element signature="e#0#19#0" expanded="true" />
</folding>

@ -13,34 +13,24 @@ configuration = {
def main():
navigator = hardwarelib.Navigator(16)
print('navigator created')
light = hardwarelib.Light(15)
print('light created')
ultrasonic = hardwarelib.Ultrasonic(11,7)
print('ultrasonic created')
temperature = hardwarelib.Temperature()
print('temperature created')
camera = graphiclib.PiCamera((500, 0), (500, 1000))
print('camera created')
jstick = controllib.Joystick(navigator, light, configuration, camera)
print('joystic created')
#pygame stuff
screen = graphiclib.Screen(size=(1000,1000))
print('created screen')
all_sprites = pygame.sprite.RenderUpdates()
list = graphiclib.List((0,0),(500,1000))
all_sprites.add(list)
all_sprites.add(camera)
clock = pygame.time.Clock()
running = True
print('in running loop')
while running:
clock.tick(25)
print('waited some time')
for event in pygame.event.get():
print(event)
if event.type == pygame.QUIT:
print('quit event')
running = False
@ -48,6 +38,7 @@ def main():
dict = jstick.handle()
print('joystick handled')
list.set_dict(dict)
print('list has dict')
all_sprites.update()
print('updating sprites')
update_rects = all_sprites.draw(screen.screen)

Loading…
Cancel
Save