Skip to content

Commit

Permalink
more Python 3 integer division
Browse files Browse the repository at this point in the history
  • Loading branch information
tvoverbeek committed Feb 15, 2022
1 parent 42205da commit bada72a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions bin/flick-armcontrol
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ def main(stdscr):
exittxt = 'Control-C to exit'
title = '**** Maplin Robotic Arm Control ****'
Instr = '**** Instructions ****'
stdscr.addstr( 0, (curses.COLS - len(title)) / 2, title)
stdscr.addstr( 9, (curses.COLS - len(exittxt)) / 2, exittxt)
stdscr.addstr( 11, (curses.COLS - len(Instr)) / 2, Instr)
stdscr.addstr( 0, (curses.COLS - len(title)) // 2, title)
stdscr.addstr( 9, (curses.COLS - len(exittxt)) // 2, exittxt)
stdscr.addstr( 11, (curses.COLS - len(Instr)) // 2, Instr)
stdscr.refresh()

datawin = curses.newwin( 6, curses.COLS - 6, 2, 3)
Expand Down
4 changes: 2 additions & 2 deletions bin/flick-snail
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def main(stdscr):
# Add title and footer
exittxt = 'Control-C to exit'
title = '**** Flick Demo ****'
stdscr.addstr( 0, (curses.COLS - len(title)) / 2, title)
stdscr.addstr(22, (curses.COLS - len(exittxt)) / 2, exittxt)
stdscr.addstr( 0, (curses.COLS - len(title)) // 2, title)
stdscr.addstr(22, (curses.COLS - len(exittxt)) // 2, exittxt)
stdscr.refresh()

datawin = curses.newwin( 8, curses.COLS - 6, 2, 3)
Expand Down
6 changes: 3 additions & 3 deletions bin/flick-volctrl
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def main(stdscr):
exittxt = 'Control-C to exit'
errortxt = ''
title = '**** Volume control ****'
stdscr.addstr( 0, (curses.COLS - len(title)) / 2, title)
stdscr.addstr(10, (curses.COLS - len(exittxt)) / 2, exittxt)
stdscr.addstr(22, (0 - len(errortxt)) / 2, errortxt)
stdscr.addstr( 0, (curses.COLS - len(title)) // 2, title)
stdscr.addstr(10, (curses.COLS - len(exittxt)) // 2, exittxt)
stdscr.addstr(22, (0 - len(errortxt)) // 2, errortxt)
stdscr.refresh()

# Setup the mixer
Expand Down

0 comments on commit bada72a

Please sign in to comment.