#!/bin/bash
################################################################################
# Copyright 2025 ModalAI Inc.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
#    this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
#    this list of conditions and the following disclaimer in the documentation
#    and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors
#    may be used to endorse or promote products derived from this software
#    without specific prior written permission.
#
# 4. The Software is used solely in conjunction with devices provided by
#    ModalAI Inc.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
################################################################################

PLATFORM_CONFIG=$(cat /sys/module/voxl_platform_mod/parameters/config)
CONFIG_DIR="/usr/share/modalai/voxl-camera-server/standard_configs/platform_config_$PLATFORM_CONFIG"

cd $CONFIG_DIR

for f in *; do
	echo "$f"
done

## old list, keep for record
# echo -e "0  None"
# echo -e "1  tracking(ov7251) + Stereo(ov7251)"
# echo -e "2  tracking(ov7251) Only"
# echo -e "3  Hires(imx214) + Stereo(ov7251) + tracking(ov7251)"
# echo -e "4  Hires(imx214) + tracking(ov7251)"
# echo -e "5  TOF + tracking(ov7251)"
# echo -e "${SET_BOLD}6 Hires(imx214) + TOF + tracking(ov7251)${RESET_ALL}"
# echo -e "7  TOF + Stereo(ov7251) + tracking(ov7251)"
# echo -e "8  Hires(imx214) Only"
# echo -e "9  TOF Only"
# echo -e "10 Stereo(ov7251) only"
# echo -e "${SET_BOLD}11 tracking(ov7251) + Hires(imx214) + Dual Stereo${RESET_ALL}"
# echo -e "12 Stereo(OV9782) only"
# echo -e "13 Hires(imx214) + Stereo(ov7251)"
# echo -e "14 Stereo(OV9782) + TOF + tracking(ov7251)"
# echo -e "${SET_BOLD}15 Dual OV9782${RESET_ALL}"
# echo -e "16 Hires(imx214) + TOF + Dual tracking(ov7251)"
