src/driver/glcd: code formatting

Origin commit data
------------------
Commit: 39cfc018db
Author: max_10 <max_10@gmx.de>
Date: 2023-08-14 (Mon, 14 Aug 2023)

Origin message was:
------------------
- src/driver/glcd: code formatting

Signed-off-by: Thilo Graf <dbt@novatux.de>

# Conflicts:
#	src/driver/glcd/glcd.cpp
This commit is contained in:
max_10
2023-08-15 20:55:34 +02:00
committed by Thilo Graf
parent 2434e49cdc
commit db21ead167
10 changed files with 427 additions and 319 deletions

View File

@@ -1,26 +1,25 @@
/*
weather - DBoxII-Project
weather - DBoxII-Project
Copyright (C) 2018 redblue
Copyright (C) 2018 redblue
License: GPL
License: GPL
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <config.h>
#include <cstdio>
#include "weather.h"
@@ -62,16 +61,20 @@ void WeatherUpdateFonts()
standby_weather_percent = std::min(t.glcd_standby_weather_percent, 100);
int standby_weather_fontsize_new = standby_weather_percent * cglcd->lcd->Height() / 100;
if (!fonts_initialized || (weather_fontsize_new != weather_fontsize)) {
if (!fonts_initialized || (weather_fontsize_new != weather_fontsize))
{
weather_fontsize = weather_fontsize_new;
if (!font_temperature.LoadFT2(t.glcd_font, "UTF-8", weather_fontsize)) {
if (!font_temperature.LoadFT2(t.glcd_font, "UTF-8", weather_fontsize))
{
font_temperature.LoadFT2(g_settings.font_file, "UTF-8", weather_fontsize);
}
}
if (!fonts_initialized || (standby_weather_fontsize_new != standby_weather_fontsize)) {
if (!fonts_initialized || (standby_weather_fontsize_new != standby_weather_fontsize))
{
standby_weather_fontsize = standby_weather_fontsize_new;
if (!font_temperature_standby.LoadFT2(t.glcd_font, "UTF-8", standby_weather_fontsize)) {
if (!font_temperature_standby.LoadFT2(t.glcd_font, "UTF-8", standby_weather_fontsize))
{
font_temperature_standby.LoadFT2(g_settings.font_file, "UTF-8", standby_weather_fontsize);
}
}