Skip to content

chore: remove dead code and unused config - #32

Merged
ozan956 merged 1 commit into
mainfrom
cleanup/dead-code
Sep 5, 2026
Merged

chore: remove dead code and unused config#32
ozan956 merged 1 commit into
mainfrom
cleanup/dead-code

Conversation

@ozan956

@ozan956 ozan956 commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Cleanup around the dead code that I am aware so long but did not have a time to fix them all.

This commit removes:

  • device/camera/esp32_ov2640_old.cpp (whole file, superseded)
  • arch/arm/cm7_common.c and arch/arm/cm7_fft.c (comment-only stubs; functionality moved to dwt_timer.c / cmsis_fft.c)
  • core/image.h: GMMStats typedef (never instantiated)
  • imgproc/filter.h: SepFilter2DContext struct (never instantiated)
  • imgproc/filter.c: commented-out dead wrapper() function, and unused STRONG/WEAK macros (Canny hardcodes the literals instead)
  • imgproc/fft.c: multiply() function (not declared in fft.h, no callers)
  • imgproc/segmentation.c: GMMComponent struct, GMM_COMPONENTS macro, and gaussian_prob() (none called by grabCutLite or anything else)
  • device/serial/stm32_uart.c: UART_CMD_CAPTURE/UART_CMD_SEND macros (code uses local "STR"/"STW" arrays instead), and the tx_flag/rx_flag globals plus their writes in the HAL UART callbacks (write-only, never read; also removes an uninitialized-tx_flag bug since only rx_flag was zero-initialized)
  • board/stm32f7/configs.h: LCD_FRAME_BUFFER and CAMERA_FRAME_BUFFER defines (never read; display code uses FRAME_BUFFER)
  • embedDIP_configs.h: derived EMBED_DIP_HAS_CAMERA/EMBED_DIP_HAS_DISPLAY macros and ENABLE_UART_LOGGING defines (all board sections; never consumed anywhere)
  • CMakeLists.txt: EMBEDDIP_BUILD_DOCS and EMBEDDIP_ENABLE_UART_LOGGING options, plus the associated ENABLE_UART_LOGGING compile definition (neither option was consumed elsewhere in the build)

Cleanup around the dead code that I am aware so long but did not
have a time to fix them all.

This commit removes:
- device/camera/esp32_ov2640_old.cpp (whole file, superseded)
- arch/arm/cm7_common.c and arch/arm/cm7_fft.c (comment-only stubs;
  functionality moved to dwt_timer.c / cmsis_fft.c)
- core/image.h: GMMStats typedef (never instantiated)
- imgproc/filter.h: SepFilter2DContext struct (never instantiated)
- imgproc/filter.c: commented-out dead wrapper() function, and unused
  STRONG/WEAK macros (Canny hardcodes the literals instead)
- imgproc/fft.c: multiply() function (not declared in fft.h, no callers)
- imgproc/segmentation.c: GMMComponent struct, GMM_COMPONENTS macro,
  and gaussian_prob() (none called by grabCutLite or anything else)
- device/serial/stm32_uart.c: UART_CMD_CAPTURE/UART_CMD_SEND macros
  (code uses local "STR"/"STW" arrays instead), and the tx_flag/rx_flag
  globals plus their writes in the HAL UART callbacks (write-only,
  never read; also removes an uninitialized-tx_flag bug since only
  rx_flag was zero-initialized)
- board/stm32f7/configs.h: LCD_FRAME_BUFFER and CAMERA_FRAME_BUFFER
  defines (never read; display code uses FRAME_BUFFER)
- embedDIP_configs.h: derived EMBED_DIP_HAS_CAMERA/EMBED_DIP_HAS_DISPLAY
  macros and ENABLE_UART_LOGGING defines (all board sections; never
  consumed anywhere)
- CMakeLists.txt: EMBEDDIP_BUILD_DOCS and EMBEDDIP_ENABLE_UART_LOGGING
  options, plus the associated ENABLE_UART_LOGGING compile definition
  (neither option was consumed elsewhere in the build)

Signed-off-by: Ozan Durgut <ozndrgt@gmail.com>
@ozan956 ozan956 self-assigned this Sep 5, 2026
@ozan956
ozan956 merged commit c23a72c into main Sep 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant