Skip to content

Commit

Permalink
pokemon_app: Use species instead of hex for normalizing
Browse files Browse the repository at this point in the history
  • Loading branch information
kbembedded committed Sep 15, 2023
1 parent bebe8da commit a2b8258
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pokemon_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
struct pokemon_data_table {
const char* name;
const Icon* icon;
const uint8_t hex;
const uint8_t species;
};

typedef struct pokemon_data_table PokemonTable;
Expand Down
5 changes: 2 additions & 3 deletions views/trade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "../pokemon_data.h"

/* XXX: Convert all of these to be maintained in a struct in the Trade context */
/* TODO: Convert all of these to be maintained in a struct in the Trade context */
uint8_t out_data = 0;
uint8_t in_data = 0;
uint8_t shift = 0;
Expand Down Expand Up @@ -357,8 +357,7 @@ void trade_enter_callback(void* context) {
pokemon_fap->connected = false;
pokemon_fap->gameboy_status = GAMEBOY_INITIAL;

/* XXX: Change hex to species to match pokemon nomenclature */
DATA_BLOCK[12] = pokemon_fap->pokemon_table[pokemon_fap->curr_pokemon].hex;
DATA_BLOCK[12] = pokemon_fap->pokemon_table[pokemon_fap->curr_pokemon].species;
// B3 (Pin6) / SO (2)
furi_hal_gpio_write(&GAME_BOY_SO, false);
furi_hal_gpio_init(&GAME_BOY_SO, GpioModeOutputPushPull, GpioPullNo, GpioSpeedVeryHigh);
Expand Down

0 comments on commit a2b8258

Please sign in to comment.