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

Port factorytest #88

Merged
merged 14 commits into from
Oct 13, 2023
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
File renamed without changes
Binary file added assets/test/kid1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/test/stereo_test.mid
Binary file not shown.
4 changes: 2 additions & 2 deletions components/hdw-bzr/hdw-bzr.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void deinitBuzzer(void)
* @brief Set the buzzer's bgm volume. setBgmVolumeSetting() should be called instead if the new volume should be
* persistent through a reboot.
*
* @param vol The background volume, 0 to 13
* @param vol The background volume, 0 to MAX_VOLUME
*/
void bzrSetBgmVolume(uint16_t vol)
{
Expand All @@ -208,7 +208,7 @@ void bzrSetBgmVolume(uint16_t vol)
* @brief Set the buzzer's sfx volume. setSfxVolumeSetting() should be called instead if the new volume should be
* persistent through a reboot.
*
* @param vol The background volume, 0 to 13
* @param vol The background volume, 0 to MAX_VOLUME
*/
void bzrSetSfxVolume(uint16_t vol)
{
Expand Down
2 changes: 2 additions & 0 deletions components/hdw-bzr/include/hdw-bzr.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
/** @brief The number of physical buzzers */
#define NUM_BUZZERS 2

#define MAX_VOLUME 13

/**
* @brief Frequencies for all the notes, in hertz.
*
Expand Down
2 changes: 2 additions & 0 deletions components/hdw-mic/include/hdw-mic.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
/// The maximum number of bytes read by the ADC in one go
#define ADC_READ_LEN 512

#define MAX_MIC_GAIN 7

//==============================================================================
// Function Prototypes
//==============================================================================
Expand Down
2 changes: 1 addition & 1 deletion components/hdw-tft/hdw-tft.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static esp_lcd_panel_io_handle_t tft_io_handle = NULL;
* @brief Set TFT Backlight brightness. setTftBrightnessSetting() should be called instead if the new volume should be
* persistent through a reboot.
*
* @param intensity Sets the brightness 0-7
* @param intensity The brightness, 0 to MAX_TFT_BRIGHTNESS
*
* @return value is 0 if OK nonzero if error.
*/
Expand Down
3 changes: 3 additions & 0 deletions components/hdw-tft/include/hdw-tft.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@

#include "palette.h"

/// The maximum brightness setting of the TFT
#define MAX_TFT_BRIGHTNESS 7

#if defined(CONFIG_ST7735_160x80)
#define TFT_WIDTH 160
#define TFT_HEIGHT 80
Expand Down
4 changes: 2 additions & 2 deletions emulator/src/components/hdw-bzr/hdw-bzr.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void deinitBuzzer(void)
/**
* @brief Set the buzzer's bgm volume
*
* @param vol The background volume, 0 to 13
* @param vol The background volume, 0 to MAX_VOLUME
*/
void bzrSetBgmVolume(uint16_t vol)
{
Expand All @@ -146,7 +146,7 @@ void bzrSetBgmVolume(uint16_t vol)
/**
* @brief Set the buzzer's sfx volume
*
* @param vol The background volume, 0 to 13
* @param vol The background volume, 0 to MAX_VOLUME
*/
void bzrSetSfxVolume(uint16_t vol)
{
Expand Down
2 changes: 1 addition & 1 deletion emulator/src/components/hdw-tft/hdw-tft.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ void drawDisplayTft(fnBackgroundDrawCallback_t fnBackgroundDrawCallback)
/**
* @brief Set TFT Backlight brightness.
*
* @param intensity Sets the brightness 0-7
* @param intensity The brightness, 0 to MAX_TFT_BRIGHTNESS
*
* @return value is 0 if OK nonzero if error.
*/
Expand Down
57 changes: 29 additions & 28 deletions main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,25 @@ idf_component_register(SRCS "swadge2024.c"
"menu/menu_utils.c"
"menu/menuLogbookRenderer.c"
"modes/accelTest/accelTest.c"
"modes/breakout/aabb_utils.c"
"modes/breakout/breakout.c"
"modes/breakout/entity.c"
"modes/breakout/entityManager.c"
"modes/breakout/gameData.c"
"modes/breakout/soundManager.c"
"modes/breakout/starfield.c"
"modes/breakout/tilemap.c"
"modes/colorchord/colorchord.c"
"modes/dance/dance.c"
"modes/dance/portableDance.c"
"modes/demo/demoMode.c"
"modes/factoryTest/factoryTest.c"
"modes/gamepad/gamepad.c"
"modes/jukebox/jukebox.c"
"modes/lumberjack/lumberjack.c"
"modes/lumberjack/lumberjackGame.c"
"modes/lumberjack/lumberjackEntity.c"
"modes/lumberjack/lumberjackPlayer.c"
"modes/jukebox/jukebox.c"
"modes/mainMenu/mainMenu.c"
"modes/marbles/marbles.c"
"modes/mfpaint/mode_paint.c"
Expand All @@ -41,35 +50,26 @@ idf_component_register(SRCS "swadge2024.c"
"modes/mfpaint/paint_ui.c"
"modes/mfpaint/paint_util.c"
"modes/mfpaint/px_stack.c"
"modes/pushy/pushy.c"
"modes/pong/pong.c"
"modes/breakout/breakout.c"
"modes/breakout/tilemap.c"
"modes/breakout/entityManager.c"
"modes/breakout/entity.c"
"modes/breakout/gameData.c"
"modes/breakout/soundManager.c"
"modes/breakout/aabb_utils.c"
"modes/breakout/starfield.c"
"modes/platformer/plEntity.c"
"modes/platformer/plEntityManager.c"
"modes/platformer/plGameData.c"
"modes/platformer/mode_platformer.c"
"modes/platformer/plTilemap.c"
"modes/platformer/plSoundManager.c"
"modes/touchTest/touchTest.c"
"modes/pong/pong.c"
"modes/pushy/pushy.c"
"modes/quickSettings/menuQuickSettingsRenderer.c"
"modes/quickSettings/quickSettings.c"
"modes/ray/fp_math.c"
"modes/ray/mode_ray.c"
"modes/ray/ray_renderer.c"
"modes/ray/ray_dialog.c"
"modes/ray/ray_map.c"
"modes/ray/ray_object.c"
"modes/ray/ray_tex_manager.c"
"modes/ray/ray_player.c"
"modes/ray/ray_dialog.c"
"modes/ray/ray_pause.c"
"modes/ray/ray_renderer.c"
"modes/ray/ray_script.c"
"modes/ray/ray_tex_manager.c"
"modes/ray/ray_player.c"
"modes/ray/ray_warp_screen.c"
"modes/ray/enemies/ray_enemy.c"
"modes/ray/enemies/ray_enemy.h"
Expand All @@ -85,11 +85,12 @@ idf_component_register(SRCS "swadge2024.c"
"modes/ray/enemies/ray_enemy_normal.h"
"modes/ray/enemies/ray_enemy_strong.c"
"modes/ray/enemies/ray_enemy_strong.h"
"modes/tunernome/tunernome.c"
"modes/soko/soko_game.c"
"modes/soko/soko_gamerules.c"
"modes/soko/soko_input.c"
"modes/soko/soko.c"
"modes/touchTest/touchTest.c"
"modes/tunernome/tunernome.c"
"utils/color_utils.c"
"utils/geometry.c"
"utils/linked_list.c"
Expand Down Expand Up @@ -121,26 +122,26 @@ idf_component_register(SRCS "swadge2024.c"
"./display"
"./menu"
"./modes/accelTest"
"./modes/touchTest"
"./modes/breakout"
"./modes/colorchord"
"./modes/dance"
"./modes/demo"
"./modes/factoryTest"
"./modes/gamepad"
"./modes/jukebox"
"./modes/pushy"
"./modes/pong"
"./modes/breakout"
"./modes/platformer"
"./modes/tunernome"
"./modes/mainMenu"
"./modes/demo"
"./modes/soko"
"./modes/lumberjack"
"./modes/mainMenu"
"./modes/marbles"
"./modes/mfpaint"
"./modes/platformer"
"./modes/pong"
"./modes/pushy"
"./modes/quickSettings"
"./modes/ray"
"./modes/ray/enemies"
"./modes/demo"
"./modes/quickSettings")
"./modes/soko"
"./modes/touchTest"
"./modes/tunernome")

function(spiffs_file_preprocessor)
add_custom_target(spiffs_preprocessor ALL
Expand Down
Loading