Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added in embedded science code #669

Merged
merged 4 commits into from
Mar 29, 2024
Merged

Conversation

YnotCode
Copy link
Contributor

Summary

Closes #(Your issue number here)

What features did you add, bugs did you fix, etc?

Did you add documentation to the wiki?

Yes/No (If not explain why not)

How was this code tested?

Summarize how you tested this code. Your objective here is to prove to the reviewers that this code actually works without them having to run it themselves. It is often helpful to include screenshots, tables, graphs, and/or a short write-up of testing procedures. Results can be either from sim, the robot, or both depending on what you think is sufficient for the feature you added.

Did you test this in sim?

Yes/No

Did you test this on the rover?

Yes/No

Did you add unit tests?

Yes/No (If not explain why not)

@YnotCode YnotCode linked an issue Mar 29, 2024 that may be closed by this pull request
@tabiosg tabiosg self-requested a review March 29, 2024 15:25

Heater::Heater(DiagTempSensor const& diag_temp_sensor, Pin const& heater_pin)
: m_diag_temp_sensor(std::move(diag_temp_sensor)),
m_heater_pin(std::move(heater_pin)),
m_state(false),
m_auto_shutoff_enabled(true),
m_auto_shutoff_enabled(true), // TODO - may want to make true if thermistors work
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove comment!

uint8_t buf[2];
buf[0] = I2C_AS72XX_WRITE_REG;
buf[1] = (virtual_reg | 0x80);
// m_i2c_bus->blocking_transmit(SPECTRAL_7b_ADDRESS, buf[0]);
Copy link
Contributor

Choose a reason for hiding this comment

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

remove ghost comments

buf[0] = I2C_AS72XX_WRITE_REG;
buf[1] = virtual_reg;
HAL_I2C_Master_Transmit(&hi2c1, SPECTRAL_7b_ADDRESS << 1, buf, sizeof(buf), 100);
// UNABLE TO USE this format because TSend is 1 byte, need to double up
Copy link
Contributor

Choose a reason for hiding this comment

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

remove ghost comments, add as an issue instead

}

}
//void HAL_I2C_MasterTXCpltCallback(I2C_HandleTypeDef *hi2c) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Delete this code

m_i2c_bus->blocking_transmit(SPECTRAL_7b_ADDRESS, CONTROL_SETUP_REG);
virtual_write(CONTROL_SETUP_REG, control_data);
osDelay(50);
// virtual_write(CONTROL_SETUP_REG, control_data);
Copy link
Contributor

Choose a reason for hiding this comment

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

del code

@tabiosg tabiosg merged commit c96726e into integration Mar 29, 2024
1 check failed
@tabiosg tabiosg deleted the integration-with-embedded branch March 29, 2024 15:51
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.

Read Data from Spectral Sensors Using I2C Mux
2 participants