Update API endpoints for camera2 and enhance logging options in USDA Vision System

- Changed camera1 references to camera2 in API endpoint documentation for start and stop recording.
- Added debug and verbose logging options in the USDA Vision System to improve debugging capabilities.
- Updated TopNavbar component for improved user experience with cursor pointer styling.
This commit is contained in:
salirezav
2025-09-11 14:25:20 -04:00
parent 8e7b5b054f
commit f8d720964e
6 changed files with 21 additions and 6 deletions

View File

@@ -226,7 +226,7 @@ GET http://localhost:8000/cameras/camera2/status
###############################################################################
### Start recording (with all optional parameters)
POST http://localhost:8000/cameras/camera1/start-recording
POST http://localhost:8000/cameras/camera2/start-recording
Content-Type: application/json
{
@@ -273,7 +273,7 @@ Content-Type: application/json
###
### Start recording (empty body - all defaults)
POST http://localhost:8000/cameras/camera1/start-recording
POST http://localhost:8000/cameras/camera2/start-recording
Content-Type: application/json
{}
@@ -282,6 +282,7 @@ Content-Type: application/json
### Stop recording
POST http://localhost:8000/cameras/camera1/stop-recording
### Stop recording
POST http://localhost:8000/cameras/camera2/stop-recording
# No request body required
# Response: StopRecordingResponse
@@ -533,7 +534,7 @@ Content-Type: application/json
### Start streaming for camera1
curl -X POST http://localhost:8000/cameras/camera1/start-stream
curl -X POST http://exp-dash:8000/cameras/camera2/start-stream
# View live stream (open in browser)
# http://localhost:8000/cameras/camera1/stream

View File

@@ -245,6 +245,8 @@ def main():
parser = argparse.ArgumentParser(description="USDA Vision Camera System")
parser.add_argument("--config", type=str, help="Path to configuration file", default="config.json")
parser.add_argument("--log-level", type=str, choices=["DEBUG", "INFO", "WARNING", "ERROR"], help="Override log level", default=None)
parser.add_argument("--debug", action="store_true", help="Enable debug mode (sets log level to DEBUG)")
parser.add_argument("--verbose", action="store_true", help="Enable verbose logging (sets log level to DEBUG and enables additional debug output)")
args = parser.parse_args()
@@ -252,7 +254,13 @@ def main():
system = USDAVisionSystem(args.config)
# Override log level if specified
if args.log_level:
if args.debug or args.verbose:
logging.getLogger().setLevel(logging.DEBUG)
# Enable debug mode in the system
if hasattr(system.config.system, 'debug_mode'):
system.config.system.debug_mode = True
print("🐛 Debug mode enabled - verbose logging active")
elif args.log_level:
logging.getLogger().setLevel(getattr(logging, args.log_level))
try: