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

Remove unused param #399

Closed
wants to merge 4 commits into from
Closed
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
4 changes: 2 additions & 2 deletions src/apps/watchfaces/OswAppWatchfaceMix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const char* OswAppWatchfaceMix::getAppName() {
void OswAppWatchfaceMix::analogWatchDisplay() {
OswHal* hal = OswHal::getInstance();
uint32_t second = 0;
uint32_t minute = 0; // Unused, but required by function signature
uint32_t hour = 0; // Unused, but required by function signature
uint32_t minute = 0;
uint32_t hour = 0;

hal->getLocalTime(&hour, &minute, &second);
hal->gfx()->drawCircle((int)(DISP_W*0.5)-OFF_SET_ANALOG_WATCH_X_COORD, 100, 50, ui->getForegroundColor());
Expand Down
6 changes: 2 additions & 4 deletions src/hal/environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,8 @@ void OswHal::Environment::setupStepStatistics() {
* @param alwaysPrintStepStatistics Set to true to print the step history to the console
*/
void OswHal::Environment::commitStepStatistics(const bool& alwaysPrintStepStatistics) {
uint32_t currDoM = 0; // Unused, but required by function signature
uint32_t currDoW = 0;
OswHal::getInstance()->getLocalDate(&currDoM, &currDoW);
OswHal::getInstance()->getLocalDate(nullptr, &currDoW);
bool changedDoW = currDoW != this->_stepsLastDoW;
if(changedDoW) {
Preferences prefs;
Expand Down Expand Up @@ -225,9 +224,8 @@ uint32_t OswHal::Environment::getStepsTotalWeek() {
#ifdef OSW_FEATURE_STATS_STEPS
this->commitStepStatistics();
uint32_t sum = 0;
uint32_t currDoM = 0; // Unused, but required by function signature
uint32_t currDoW = 0;
OswHal::getInstance()->getLocalDate(&currDoM, &currDoW);
OswHal::getInstance()->getLocalDate(nullptr, &currDoW);
for (uint8_t i = 0; i < 7; i++) {
if (i == currDoW) {
sum = sum + this->getStepsToday();
Expand Down
4 changes: 3 additions & 1 deletion src/hal/time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ void OswHal::getDate(time_t& offset, uint32_t* day, uint32_t* weekDay) {
RtcDateTime d = RtcDateTime();
d.InitWithUnix32Time(this->getTime(offset));
*weekDay = d.DayOfWeek();
*day = d.Day();
if (day != nullptr){
*day = d.Day();
}
}

void OswHal::getDate(time_t& offset, uint32_t* day, uint32_t* month, uint32_t* year) {
Expand Down
Loading