diff --git a/pycrocart/PyCroCart.py b/pycrocart/PyCroCart.py index 5ea6ea8ec2fcdb689699c1d25d6c4ea63f24a893..49e40fd723d2822222b60089502efc1f7e95cb0b 100644 --- a/pycrocart/PyCroCart.py +++ b/pycrocart/PyCroCart.py @@ -61,7 +61,7 @@ if __name__ == '__main__': app = QApplication(sys.argv) cf1 = CrazyflieProtoConnection() - uri = 'radio://0/80/2M/E7E7E7E7E7' + uri = 'radio://0/20/2M/E7E7E7E7E7' cf1.connect(uri) cf1.scf.cf.commander = uCartCommander.Commander(cf1.scf.cf) diff --git a/pycrocart/SetpointMenu.py b/pycrocart/SetpointMenu.py index a4a3580e8b3aa8ad7f2b2cc06339ba35e17f7a11..0740a18154cf4a13d1d6c19ea7a7a499a8ebab85 100644 --- a/pycrocart/SetpointMenu.py +++ b/pycrocart/SetpointMenu.py @@ -173,13 +173,16 @@ class SetpointMenu(QWidget): else: self.setpoint_handler.setRateMode() - yaw = self.cap_max_value(yaw, 20, -20) - pitch = self.cap_max_value(pitch, 5, -5) - roll = self.cap_max_value(roll, 5, -5) - - # If you are a flypi do this - thrust = thrust + 100 - thrust = self.cap_max_value(thrust, 340, 240) + if self.gamepad_button.isChecked(): + yaw = self.cap_max_value(yaw, 20, -20) + pitch = self.cap_max_value(pitch, 5, -5) + roll = self.cap_max_value(roll, 5, -5) + + # If you are a flypi do this + thrust = thrust + 240 + thrust = self.cap_max_value(thrust, 340, 240) + print("thrust") + print(thrust) # otherwise don't..... but I'm not changing that rn diff --git a/pycrocart/logging_variables.json b/pycrocart/logging_variables.json index 8a5ebf63afd242a4e7eebd27a5b7d3c09c880f63..67b220d72ce664a07482685e1acc87efe8116b87 100644 --- a/pycrocart/logging_variables.json +++ b/pycrocart/logging_variables.json @@ -2,12 +2,7 @@ "group1": { "update_frequency_ms": 50, - "vars": ["ctrlStdnt.msrdPitchRate", "ctrlStdnt.dsirdPitchRate", "stateEstimate.roll", "stateEstimate.yaw", "ctrlStdnt.desiredPitch"] - }, - "group2": - { - "update_frequency_ms": 50, - "vars": ["ctrlStdnt.cmd_thrust", "ctrlStdnt.cmd_roll", "ctrlStdnt.cmd_pitch", "stateEstimate.pitch", "ctrlStdnt.cmd_yaw"] + "vars": ["stateEstimate.roll", "stateEstimate.yaw", "stateEstimate.pitch"] }, "group3": {