| Chunk |
|---|
| Conflicting content |
|---|
public class Bluestorm extends Activity
{
Nxt nxt;
<<<<<<< HEAD
Capteurs capteurs;
=======
public void applySpeed(float[] orientation) throws IOException
{
double leftPower, rightPower;
double accel = (orientation[2]/50.) * 100;
double orient = (orientation[1]/50.) * 50;
leftPower = accel;
rightPower = accel;
if(orientation[1] > 0) {
leftPower -= orient;
} else {
rightPower += orient;
}
if(leftPower > 100) leftPower = 100;
if(leftPower < -100) leftPower = -100;
if(rightPower > 100) rightPower = 100;
if(rightPower < -100) rightPower = -100;
Log.d("bluestorm", String.format("applySpeed: %3.0f %3.0f", leftPower, rightPower));
this.nxt.setSpeed((byte)leftPower, (byte)rightPower);
}
>>>>>>> 5c2f08cc25170fcb5810c85577e29843565bbcb7
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) { |
| Solution content |
|---|
public class Bluestorm extends Activity
{
Nxt nxt;
<<<<<<< HEAD
Capteurs capteurs;
=======
public void applySpeed(float[] orientation) throws IOException
{
double leftPower, rightPower;
double accel = (orientation[2]/50.) * 100;
double orient = (orientation[1]/50.) * 50;
leftPower = accel;
rightPower = accel;
if(orientation[1] > 0) {
leftPower -= orient;
} else {
rightPower += orient;
}
if(leftPower > 100) leftPower = 100;
if(leftPower < -100) leftPower = -100;
if(rightPower > 100) rightPower = 100;
if(rightPower < -100) rightPower = -100;
Log.d("bluestorm", String.format("applySpeed: %3.0f %3.0f", leftPower, rightPower));
this.nxt.setSpeed((byte)leftPower, (byte)rightPower);
}
>>>>>>> 5c2f08cc25170fcb5810c85577e29843565bbcb7
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) { |
| File |
|---|
| Bluestorm.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Attribute |
| Method declaration |