View Single Post
  #6   Spotlight this post!  
Unread 24-01-2015, 22:09
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: Python: TypeError: unorderable types: complex() > float()?

Quote:
Originally Posted by team-4480 View Post
How would you square negatives? Thanks!
RobotDrive has support for this built in, so you should be able to just use this:
Code:
self.robot_drive.arcadeDrive(self.joystick.getX(), self.joystick.getX(), true)
This is how it is done internally:
Code:
if squaredInputs:
            # square the inputs (while preserving the sign) to increase fine
            # control while permitting full power
            if moveValue >= 0.0:
                moveValue = (moveValue * moveValue)
            else:
                moveValue = -(moveValue * moveValue)
            if rotateValue >= 0.0:
                rotateValue = (rotateValue * rotateValue)
            else:
                rotateValue = -(rotateValue * rotateValue)
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists