Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync alpha with beta #21

Open
wants to merge 6 commits into
base: alpha
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions inc/drivers/cutebot/Cutebot.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

// Reference: https://github.com/elecfreaks/pxt-cutebot

#define CUTEBOT_PERIOD_LINE_SENSORS 500
#define CUTEBOT_START_COUNT_LINE_SENSORS 300
#define CUTEBOT_PERIOD_DISTANCE_SENSOR 500
#define CUTEBOT_START_COUNT_DISTANCE_SENSOR 100
#define CUTEBOT_PERIOD_LINE_SENSORS 100
#define CUTEBOT_START_COUNT_LINE_SENSORS 0
#define CUTEBOT_PERIOD_DISTANCE_SENSOR 100
#define CUTEBOT_START_COUNT_DISTANCE_SENSOR 50

// I2C address of the Cutebot
const char CUTEBOT_I2C_ADDR = 0x10 << 1;
Expand Down
4 changes: 2 additions & 2 deletions inc/drivers/cutebot/CutebotMotor.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include "inc/drivers/Motor.h"

enum CutebotMotorId {
CUTEBOT_MOTOR_ID_RIGHT = 1,
CUTEBOT_MOTOR_ID_LEFT,
CUTEBOT_MOTOR_ID_LEFT = 1,
CUTEBOT_MOTOR_ID_RIGHT,
};

class CutebotMotor : public Motor
Expand Down
4 changes: 2 additions & 2 deletions source/drivers/cutebot/CutebotLineSensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ CutebotLineSensors::CutebotLineSensors(MicroBitIO &_io) : io(_io), readings {0,

uint16_t CutebotLineSensors::getLeftReading()
{
return this->readings[1];
return this->readings[0];
}

uint16_t CutebotLineSensors::getRightReading()
{
return this->readings[0];
return this->readings[1];
}

void CutebotLineSensors::idleTick()
Expand Down