-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from vladkorotnev/develop
Release v3.5
- Loading branch information
Showing
69 changed files
with
5,170 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ captures/ | |
.env | ||
/src/weather_icons | ||
.vscode/ | ||
/lib/nonfree-aquestalk/aquestalk.h | ||
/lib/nonfree-aquestalk/*.a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from os.path import isfile | ||
Import("env") | ||
|
||
if isfile("./lib/nonfree-aquestalk/libaquestalk.a"): | ||
print("Found a copy of AquesTalk") | ||
env.Append(BUILD_FLAGS=["-LD:lib/nonfree-aquestalk", "-laquestalk", "-DLIBAQUESTALK_FOUND"]) | ||
else: | ||
print("No AquesTalk library found") |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#pragma once | ||
#include <views/framework.h> | ||
#include <device_config.h> | ||
|
||
#if HAS(PLAYGROUND) | ||
|
||
#include <fonts.h> | ||
#include <state.h> | ||
|
||
class AppShimPlayground: public Composite { | ||
public: | ||
AppShimPlayground() { | ||
scroller = new StringScroll(&keyrus0808_font); | ||
scroller->set_y_position(6); | ||
scroller->render_mode = slides[slide].first; | ||
scroller->set_string(slides[slide].second); | ||
scroller->scroll_only_if_not_fit = false; | ||
add_composable(scroller); | ||
} | ||
|
||
void render(FantaManipulator*fb) { | ||
fb->clear(); | ||
int gridsize = 4; | ||
bool gridcol = true; | ||
for(int y = 0; y < fb->get_height(); y += gridsize) { | ||
gridcol = ((y / 4) % 2) == 0; | ||
for(int x = 0; x < fb->get_width(); x += gridsize) { | ||
fb->rect(x, y, x + gridsize, y + gridsize, true, gridcol); | ||
gridcol ^= 1; | ||
} | ||
} | ||
Composite::render(fb); | ||
} | ||
|
||
void step() { | ||
if(hid_test_key_state(KEY_LEFT) == KEYSTATE_HIT) { | ||
pop_state(STATE_PLAYGROUND, TRANSITION_SLIDE_HORIZONTAL_RIGHT); | ||
} else if(hid_test_key_any(KEY_RIGHT | KEY_UP | KEY_DOWN) == KEYSTATE_HIT) { | ||
slide++; | ||
if(slide >= slides.size()) slide = 0; | ||
scroller->render_mode = slides[slide].first; | ||
scroller->set_string(slides[slide].second); | ||
} | ||
|
||
Composite::step(); | ||
} | ||
|
||
private: | ||
StringScroll * scroller; | ||
int slide = 0; | ||
std::vector<std::pair<text_attributes_t, const char *>> slides = { | ||
{TEXT_NORMAL, "Normal"}, | ||
{TEXT_NO_BACKGROUND, "No Bg"}, | ||
{TEXT_INVERTED, "Invert"}, | ||
{TEXT_OUTLINED, "Outline"}, | ||
{TEXT_OUTLINED | OUTLINE_INVERTED, "OutInv"}, | ||
{TEXT_NO_BACKGROUND | TEXT_INVERTED, "No Bg Inv"}, | ||
{TEXT_NO_BACKGROUND | TEXT_OUTLINED, "No Bg Outl"}, | ||
{TEXT_NO_BACKGROUND | TEXT_OUTLINED | OUTLINE_INVERTED, "No Bg InvOutl"}, | ||
{TEXT_NO_BACKGROUND | TEXT_INVERTED | TEXT_OUTLINED, "NoBg Inv Out"}, | ||
{TEXT_NO_BACKGROUND | TEXT_INVERTED | TEXT_OUTLINED | OUTLINE_INVERTED, "NoBg Inv InvOut"}, | ||
}; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#pragma once | ||
#include <views/framework.h> | ||
#include <views/weather/current_weather.h> | ||
#include <views/weather/daily_forecast.h> | ||
#include <views/weather/chart_precipitation.h> | ||
#include <views/weather/chart_pressure.h> | ||
#include <state.h> | ||
|
||
class AppShimWeather: public ListView { | ||
public: | ||
AppShimWeather() { | ||
conditions = new CurrentWeatherView(); | ||
forecast = new DailyForecastView(true); | ||
precipitation = new WeatherPrecipitationChart(true); | ||
pressure = new WeatherPressureChart(true); | ||
|
||
add_view(conditions); | ||
add_view(precipitation); | ||
add_view(pressure); | ||
add_view(forecast); | ||
} | ||
|
||
void step() override { | ||
ListView::step(); | ||
if(hid_test_key_state(KEY_LEFT) == KEYSTATE_HIT) { | ||
pop_state(STATE_WEATHER, TRANSITION_SLIDE_HORIZONTAL_RIGHT); | ||
} | ||
} | ||
|
||
private: | ||
WeatherPrecipitationChart * precipitation; | ||
WeatherPressureChart * pressure; | ||
CurrentWeatherView * conditions; | ||
DailyForecastView * forecast; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,5 @@ | ||
#pragma once | ||
#include <graphics/sprite.h> | ||
#include <service/owm/weather.h> | ||
|
||
extern const ani_sprite_t thunderstorm_icon; | ||
extern const ani_sprite_t drizzle_icon; | ||
extern const ani_sprite_t rain_icon; | ||
extern const ani_sprite_t sun_icon; | ||
extern const ani_sprite_t clouds_icon; | ||
extern const ani_sprite_t broken_clouds_icon; | ||
extern const ani_sprite_t overcast_icon; | ||
extern const ani_sprite_t snow_icon; | ||
extern const ani_sprite_t mist_icon; | ||
const ani_sprite_t * sprite_from_conditions(weather_condition_t conditions); |
Oops, something went wrong.