Skip to content

Added option to join OpenGolfSim, Camera Saturation changes#172

Open
Sunnyland wants to merge 1 commit intoPiTracLM:mainfrom
Sunnyland:sunnyland-mildura
Open

Added option to join OpenGolfSim, Camera Saturation changes#172
Sunnyland wants to merge 1 commit intoPiTracLM:mainfrom
Sunnyland:sunnyland-mildura

Conversation

@Sunnyland
Copy link

Description

Added Saturation and to config. default set to 0, although James has already done this with a default to 1.
Added new Simulator - OpenGolfSim - https://opengolfsim.com/ A free golf sim with a practice range and 9 hole golf course.
Early stages of checking Simulator connection during start up.

Testing Performed

Test Environment

  • Pi Model:
  • Camera Type:
  • OS Version:
  • Installation Method:

Test Results

  • pitrac test hardware passes
  • pitrac test camera passes (if camera-related)
  • pitrac test pulse passes (if strobe-related)
  • Simulator integration tested with:

Hardware Compatibility

  • Tested on Pi 5
  • Tested with single Pi setup

Documentation

  • No documentation needed

Screenshots/Videos

Checklist

Code Quality

  • Code follows existing patterns and conventions
  • No unnecessary comments added
  • Error handling implemented appropriately

Build & Test

  • Successfully builds with ./packaging/build.sh build
  • All existing tests pass
  • New tests added for new functionality
  • Tested on actual Raspberry Pi hardware (not just CI)

Submission Requirements

  • Commits squashed if needed (git rebase -i HEAD~n)
  • CLA signed
  • PR title follows format: [PR TYPE] Brief description
  • Branch is up-to-date with main

Additional Context


@github-actions
Copy link
Contributor

Thanks for your PR! Before we can review it, please sign our Contributor License Agreement.

How to sign (right here in this PR):

  1. Read the CLA:
  2. Add a new PR comment with exactly this line (copy & paste):
    I have read the CLA Document and I hereby sign the CLA
    
  3. Already signed and not seeing the check pass? Ask me to recheck by commenting:
    recheck
    

    I have read the CLA Document and I hereby sign the CLA
    You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copy link
Collaborator

@connorgallopo connorgallopo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to pull and test / do another functional review pass - overall it looks solid just needs some cleanup!

SetConstant("gs_config.cameras.kCamera2Gain", LibCameraInterface::kCamera2Gain);
SetConstant("gs_config.cameras.kCamera2Saturation", LibCameraInterface::kCamera2Saturation);

SetConstant("gs_config.comeras.kCamera2Saturations", LibCameraInterface::kCamera2Saturation);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix indentation

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Comment on lines +63 to +64
SetConnectionState(SimConnState::kConnecting);
GS_LOG_MSG(info, "Connecting to SimSocketServer at: " + socket_connect_address_ + ":" + socket_connect_port_);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix indentation

else {
if (!GolfSimOptions::GetCommandLineOptions().lm_comparison_mode_) {
options->gain = LibCameraInterface::kCamera2Gain;
options->saturation = (float)LibCameraInterface::kCamera2Saturation;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix indentation

static double kCamera1Contrast; // 0.0 to 32.0
static double kCamera2Gain; // 0.0 to TBD??
static double kCamera2Saturation;
static double kCamera2Saturation; //0.0 = greyscale, 1.0 = normal
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix indentation

Comment on lines +219 to +220
'gs_opengolfsim_interface.cpp',
'gs_opengolfsim_results.cpp'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix indentation

# Dev scripts cache
Dev/scripts/__pycache__
packaging/pitrac
*.save
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this?

@connorgallopo
Copy link
Collaborator

It also looks like your branch is 12 commits behind HEAD - let me know if you need help rebasing

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.

2 participants