RoboWars Australia Wiki : PlannersCarMixer

RobowarsWikka1 :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
Most recent edit on 2007-11-11 14:25:52 by BhMike

Deletions:
ouvilibasrel



Edited on 2007-11-11 13:41:29 by CnacnActro

Additions:
ouvilibasrel



Edited on 2006-02-07 09:16:51 by ValeN

Additions:
%%(vb)

Deletions:
%%(php)



Edited on 2006-02-07 09:16:07 by ValeN

Additions:
%%(php)

Deletions:
%%(oobas)



Edited on 2006-02-07 09:15:16 by ValeN

Additions:
%%(oobas)

Deletions:
%%(VB)



Edited on 2006-02-06 22:50:43 by ValeN

Additions:
'buffer vars
'corrections for wiring in bot/driver stupidity, i mean really which way is the front?
'this makes the steering change direction dependant on throttle IE you can drive an arc by holding right stick and going forwards/backwards rather than an S
'"Ram Mode" steering cuts the sensitivity of the steering stick, needs tweaking per bot
'work out where the steering stick is then multiply it by the throttle to get the abs value we need to slow the inside motor by
'reverse which motor if we are flipped
'apply the slowdown depending on which way we are turning



Edited on 2006-02-06 22:46:24 by ValeN

Deletions:
If (LastFlipState = False) And (JoystickState.buttons(0) = 128) Then

If (JoystickState.buttons(0) = 128) And (debounce = False) Then
shapeFlipInput.FillColor = &HFF00&
chkFlip.Value = vbChecked
debounce = True
shapeFlipInput.FillColor = 0
If (JoystickState.buttons(0) = 0) And (debounce = False) Then
shapeFlipInput.FillColor = &H0&
chkFlip.Value = False
debounce = True
shapeFlipInput.FillColor = 0




Edited on 2006-02-06 22:43:06 by ValeN

Additions:
If chkMixing Then
	'stickx = steering
	' y = throttle
	' work out diflection from centre on steering as a percentage
	' multiply by throttle
	' add to correct side
	' cases 0 steering
	' left
	' right
	Dim Throttle As Long
	Dim Steering As Long
	Dim Flip As Boolean
	Dim LastFlipState As Boolean
	
	'false = up true = down
	
	If (LastFlipState = False) And (JoystickState.buttons(0) = 128) Then
	    
	End If
	If (JoystickState.buttons(0) = 128) And (debounce = False) Then
	    shapeFlipInput.FillColor = &HFF00&
	    chkFlip.Value = vbChecked
	    debounce = True
	Else
	    shapeFlipInput.FillColor = 0
	End If
	
	If (JoystickState.buttons(0) = 0) And (debounce = False) Then
	    shapeFlipInput.FillColor = &H0&
	    chkFlip.Value = False
	    debounce = True
	Else
	    shapeFlipInput.FillColor = 0
	End If

	
	Throttle = StickX
	Steering = StickY
	
	If chkReverseSteering Then Steering = Steering * -1
	If chkRevThrottle Then Throttle = Throttle * -1
	If chkSROT And Throttle < 0 Then Steering = Steering - 1
	
	Dim Diflection As Double
	Dim Slowdown As Double
	
	If JoystickState.buttons(11) = 128 Then
	    Shape1.FillColor = 255
	    Steering = Steering / 4
	Else
	    Shape1.FillColor = 0
	End If
	
	Diflection = (Throttle / 32767) * 2
	Slowdown = Diflection * Steering
	
	If chkFlip Then
	    Steering = Steering * -1
	    Throttle = Throttle * -1
	End If
	
	'both = full forward
	'StickX = StickX
	'StickY = StickX
	
	Select Case Steering
	    Case Is < 0 'left
	        StickX = Throttle
	        StickY = Throttle + Slowdown
	        
	    Case Is > 0 ' right
	        StickY = Throttle
	        StickX = Throttle - Slowdown
	        
	    Case Is = 0 ' straight
	        StickX = Throttle
	        StickY = Throttle
	End Select
	
End If


Deletions:
Dim Throttle As Long
                    Dim Steering As Long
                    Dim Flip As Boolean
                    Dim LastFlipState As Boolean
                   
                    'false = up true = down                                   
                    Throttle = StickX
                    Steering = StickY
                   
                    If chkReverseSteering Then Steering = Steering * -1
                    If chkRevThrottle Then Throttle = Throttle * -1
                    If chkSROT And Throttle < 0 Then Steering = Steering - 1
                   
                    Dim Diflection As Double
                    Dim Slowdown As Double
                   
                    If JoystickState.buttons(11) = 128 Then
                        Shape1.FillColor = 255
                        Steering = Steering / 4
                    Else
                        Shape1.FillColor = 0
                    End If
                   
                    Diflection = (Throttle / 32767) * 2
                    Slowdown = Diflection * Steering
                   
                    If chkFlip Then
                        Steering = Steering * -1
                        Throttle = Throttle * -1
                    End If
                   
                    '
both = full forward
                    'StickX = StickX
                    '
StickY = StickX
                   
                    Select Case Steering
                        Case Is < 0 'left
                            StickX = Throttle
                            StickY = Throttle + Slowdown
                           
                        Case Is > 0 '
right
                            StickY = Throttle
                            StickX = Throttle - Slowdown
                           
                        Case Is = 0 ' straight
                            StickX = Throttle
                            StickY = Throttle
                    End Select
                   
                End If




Edited on 2006-02-06 22:41:26 by ValeN

Additions:
Dim Throttle As Long
                End If



Deletions:
                    Dim Throttle As Long
                End If

<?php
phpinfo();
echo "Hello, World!";
?>




Edited on 2006-02-06 22:40:41 by ValeN

Additions:

<?php
phpinfo();
echo "Hello, World!";
?>




Edited on 2006-02-06 22:40:10 by ValeN

Additions:
%%(asp)

Deletions:
%%(vb)



Edited on 2006-02-06 22:39:45 by ValeN

Additions:
'false = up true = down

Deletions:
'false = up true = down
If (LastFlipState = False) And (JoystickState.buttons(0) = 128) Then

If (JoystickState.buttons(0) = 128) And (debounce = False) Then
shapeFlipInput.FillColor = &HFF00&
chkFlip.Value = vbChecked
debounce = True
shapeFlipInput.FillColor = 0
If (JoystickState.buttons(0) = 0) And (debounce = False) Then
shapeFlipInput.FillColor = &H0&
chkFlip.Value = False
debounce = True
shapeFlipInput.FillColor = 0




Oldest known version of this page was edited on 2006-02-06 22:39:08 by ValeN []
Page view:
                    Dim Throttle As Long
                    Dim Steering As Long
                    Dim Flip As Boolean
                    Dim LastFlipState As Boolean
                   
                    'false = up true = down
                   
                    If (LastFlipState = False) And (JoystickState.buttons(0) = 128) Then
                       
                    End If
                    If (JoystickState.buttons(0) = 128) And (debounce = False) Then
                        shapeFlipInput.FillColor = &HFF00&
                        chkFlip.Value = vbChecked
                        debounce = True
                    Else
                        shapeFlipInput.FillColor = 0
                    End If
                   
                    If (JoystickState.buttons(0) = 0) And (debounce = False) Then
                        shapeFlipInput.FillColor = &H0&
                        chkFlip.Value = False
                        debounce = True
                    Else
                        shapeFlipInput.FillColor = 0
                    End If

                   
                    Throttle = StickX
                    Steering = StickY
                   
                    If chkReverseSteering Then Steering = Steering * -1
                    If chkRevThrottle Then Throttle = Throttle * -1
                    If chkSROT And Throttle < 0 Then Steering = Steering - 1
                   
                    Dim Diflection As Double
                    Dim Slowdown As Double
                   
                    If JoystickState.buttons(11) = 128 Then
                        Shape1.FillColor = 255
                        Steering = Steering / 4
                    Else
                        Shape1.FillColor = 0
                    End If
                   
                    Diflection = (Throttle / 32767) * 2
                    Slowdown = Diflection * Steering
                   
                    If chkFlip Then
                        Steering = Steering * -1
                        Throttle = Throttle * -1
                    End If
                   
                    'both = full forward
                    'StickX = StickX
                    'StickY = StickX
                   
                    Select Case Steering
                        Case Is < 0 'left
                            StickX = Throttle
                            StickY = Throttle + Slowdown
                           
                        Case Is > 0 ' right
                            StickY = Throttle
                            StickX = Throttle - Slowdown
                           
                        Case Is = 0 ' straight
                            StickX = Throttle
                            StickY = Throttle
                    End Select
                   
                End If
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.1
Page was generated in 0.0964 seconds