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

drivers remove device _debug_enabled #8007

Merged
merged 3 commits into from
Sep 25, 2017
Merged
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
3 changes: 3 additions & 0 deletions ROMFS/px4fmu_common/init.d/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ mount -t procfs /proc
#
sercon

# print full system version
ver all

#
# Default to auto-start mode.
#
Expand Down
3 changes: 0 additions & 3 deletions src/drivers/bma180/bma180.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,6 @@ BMA180::BMA180(int bus, spi_dev_e device) :
{
_device_id.devid_s.devtype = DRV_ACC_DEVTYPE_BMA180;

// enable debug() calls
_debug_enabled = true;

// default scale factors
_accel_scale.x_offset = 0;
_accel_scale.x_scale = 1.0f;
Expand Down
3 changes: 0 additions & 3 deletions src/drivers/l3gd20/l3gd20.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,6 @@ L3GD20::L3GD20(int bus, const char *path, spi_dev_e device, enum Rotation rotati
_rotation(rotation),
_checked_next(0)
{
// enable debug() calls
_debug_enabled = true;

_device_id.devid_s.devtype = DRV_GYR_DEVTYPE_L3GD20;

// default scale factors
Expand Down
6 changes: 0 additions & 6 deletions src/drivers/lsm303d/lsm303d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,18 +583,12 @@ LSM303D::LSM303D(int bus, const char *path, spi_dev_e device, enum Rotation rota
_last_temperature(0),
_checked_next(0)
{


// enable debug() calls
_debug_enabled = true;

_device_id.devid_s.devtype = DRV_ACC_DEVTYPE_LSM303D;

/* Prime _mag with parents devid. */
_mag->_device_id.devid = _device_id.devid;
_mag->_device_id.devid_s.devtype = DRV_MAG_DEVTYPE_LSM303D;


// default scale factors
_accel_scale.x_offset = 0.0f;
_accel_scale.x_scale = 1.0f;
Expand Down
1 change: 0 additions & 1 deletion src/drivers/mkblctrl/mkblctrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ MK::MK(int bus, const char *_device_path) :
strncpy(_device, _device_path, sizeof(_device));
/* enforce null termination */
_device[sizeof(_device) - 1] = '\0';
_debug_enabled = true;
}

MK::~MK()
Expand Down
1 change: 0 additions & 1 deletion src/drivers/pwm_out_sim/pwm_out_sim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ PWMSim::PWMSim() :
_task_should_exit(false),
_mixers(nullptr)
{
_debug_enabled = true;
memset(_controls, 0, sizeof(_controls));

_control_topics[0] = ORB_ID(actuator_controls_0);
Expand Down
2 changes: 0 additions & 2 deletions src/drivers/stm32/adc/adc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ ADC::ADC(uint32_t channels) :
_to_system_power(nullptr),
_to_adc_report(nullptr)
{
_debug_enabled = true;

/* always enable the temperature sensor */
channels |= 1 << 16;

Expand Down
8 changes: 1 addition & 7 deletions src/drivers/stm32/tone_alarm/tone_alarm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ class ToneAlarm : public device::CDev
{
public:
ToneAlarm();
~ToneAlarm();
~ToneAlarm() = default;

virtual int init();

Expand Down Expand Up @@ -404,8 +404,6 @@ ToneAlarm::ToneAlarm() :
_next(nullptr),
_cbrk(CBRK_OFF)
{
// enable debug() calls
//_debug_enabled = true;
_default_tunes[TONE_STARTUP_TUNE] = "MFT240L8 O4aO5dc O4aO5dc O4aO5dc L16dcdcdcdc"; // startup tune
_default_tunes[TONE_ERROR_TUNE] = "MBT200a8a8a8PaaaP"; // ERROR tone
_default_tunes[TONE_NOTIFY_POSITIVE_TUNE] = "MFT200e8a8a"; // Notify Positive tone
Expand Down Expand Up @@ -439,10 +437,6 @@ ToneAlarm::ToneAlarm() :
_tune_names[TONE_HOME_SET] = "home_set";
}

ToneAlarm::~ToneAlarm()
{
}

int
ToneAlarm::init()
{
Expand Down
4 changes: 0 additions & 4 deletions src/modules/uORB/uORBDevices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ uORB::DeviceNode::DeviceNode(const struct orb_metadata *meta, const char *name,
_subscriber_count(0),
_publisher(0)
{
// enable debug() calls
//_debug_enabled = true;
}

uORB::DeviceNode::~DeviceNode()
Expand Down Expand Up @@ -833,8 +831,6 @@ uORB::DeviceMaster::DeviceMaster(Flavor f) :
(f == PUBSUB) ? TOPIC_MASTER_DEVICE_PATH : PARAM_MASTER_DEVICE_PATH),
_flavor(f)
{
// enable debug() calls
//_debug_enabled = true;
_last_statistics_output = hrt_absolute_time();
}

Expand Down
2 changes: 0 additions & 2 deletions src/platforms/posix/drivers/adcsim/adcsim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ ADCSIM::ADCSIM(uint32_t channels) :
_channel_count(0),
_samples(nullptr)
{
//_debug_enabled = true;

/* always enable the temperature sensor */
channels |= 1 << 16;

Expand Down
8 changes: 1 addition & 7 deletions src/platforms/posix/drivers/tonealrmsim/tone_alarm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class ToneAlarm : public VirtDevObj
{
public:
ToneAlarm();
~ToneAlarm();
~ToneAlarm() = default;

virtual int devIOCTL(unsigned long cmd, unsigned long arg);
virtual ssize_t devWrite(const void *buffer, size_t len);
Expand Down Expand Up @@ -218,8 +218,6 @@ ToneAlarm::ToneAlarm() :
_next(nullptr),
_note_call{}
{
// enable debug() calls
//_debug_enabled = true;
_default_tunes[TONE_STARTUP_TUNE] = "MFT240L8 O4aO5dc O4aO5dc O4aO5dc L16dcdcdcdc"; // startup tune
_default_tunes[TONE_ERROR_TUNE] = "MBT200a8a8a8PaaaP"; // ERROR tone
_default_tunes[TONE_NOTIFY_POSITIVE_TUNE] = "MFT200e8a8a"; // Notify Positive tone
Expand Down Expand Up @@ -252,10 +250,6 @@ ToneAlarm::ToneAlarm() :
_tune_names[TONE_HOME_SET] = "home_set";
}

ToneAlarm::~ToneAlarm()
{
}

unsigned
ToneAlarm::note_to_divisor(unsigned note)
{
Expand Down
4 changes: 0 additions & 4 deletions src/systemcmds/ver/ver.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ int ver_main(int argc, char *argv[])
const char *board_name = px4_board_name();
ret = strcmp(board_name, argv[2]);

if (ret == 0) {
PX4_INFO("match: %s", board_name);
}

return ret;

} else {
Expand Down