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

Power consumption + integral + misc qol changes #79

Merged
merged 19 commits into from
Dec 2, 2024
Merged

Conversation

jackschedel
Copy link
Member

Bradley the 🐐

Hqllow and others added 17 commits October 3, 2024 19:59
no formula for median implemented
Added Median Value, Function to multiply data sets, custom KPH dataset and motor power consumption dataset
FUNNY BUTTON
ITS FIXED NOW!!!! UwU <3 xD
and also autoupdate

:)
FUCK KPH WE ONLY USE FREEDOM NUMBERS RAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
no mo'
its fix
L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L INTEFRAL INTEGRAL INTEGRAL  if only my calc 1 teacher copuld see my now oh boy
IM SPINNING IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING  IM SPINNING   Now, now, let's 🔠7️⃣ hear 👂 this post 🚩 out, fellas 👨. It's important ‼ to hear 👂 both sides 👈👉, and the Right ✔ has a long 🤪 and intellectual 😠 theoretical tradition ✝.

Uncle 🧔 Ted 🤮, that Evola guy 👦, the big 🔝 Adolf ⚫ H 🅱. himself 🔪🙈, the Christchurch gentleman 👴, Jordan 🇯🇴 Peterson, I 👁 could go 🏃 on. The list 📜📝 is endless ♾🏖, and I 👁 don't think 🤔 the SJW 😡🔪 Left ⬅👈 should dismiss 😡 high 🔫 level 📏 ideas 💡 offhand simply 🍦 because they involve bombing 💣 orphanages 🏫. It may 🌼🌷🌹 even 💅 be profitable. Let's 👏 have a debate 💬 in the free 🆓 marketplace of ideas 💡.

If you 👆 could expand 💗 your 👉 orphan 👶 killing 🔪🔫 theory 🤑😵💫 to something 😩 lengthier -- say 🗣 manifesto 📕 length 📏 -- and force 🍆 a major ↔ newspaper 🗞 to publish 🤓 it, I 👁 think 🤔 you 👆 could really 💯 be onto 😿 something 🙅‍♀️ here.
@jackschedel
Copy link
Member Author

jackschedel commented Nov 15, 2024

@Seth10001 sorry for the different PR (I hate forks). Here's the diff for the changes you haven't reviewed: https://github.com/Solar-Gators/Pit-GUI/pull/79/files/6157d1ff117530788f2acac53de9665e0989382c..4eaff788de5f97bb9ca8937b2d2e7bd2bb86c87b

I made the change you suggested to better show what the setting does (I added an information popup). In addition, since the last approval, I reworked your password code to be cleaner, and Bradley implemented a Reimann sum integral statistic! (so that plus the new power_consumption statistic he added is pretty sick).

Also, please let me know if you figure out how to fix the e2e test. Do we need to adjust the cypress test file, or something else?

@Seth10001
Copy link
Member

@jackschedel

The e2e tests apear to be broken because the db seed no longer works

  1) Viewing Live Telemetry
       Motor Controller
         "before all" hook for "should show motor controller tab":
     CypressError: `cy.task('seed:db')` failed with the following error:

> Command failed: docker exec 4565ba768cd903871de4c01e891515192c469dafde94516dd2fa6738dc468d48 npm run seed
ERROR: Unknown column 'low_cell_res_' in 'field list'

@@ -78,6 +78,7 @@ export interface DataResponse extends CanData {
rx0: PowerBoard_RX0;
rx1: PowerBoard_RX1;
};
calculated: {};
Copy link
Member

Choose a reason for hiding this comment

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

Why is this needed? Do you plan to return real time calcaulted data later?

Copy link
Member Author

Choose a reason for hiding this comment

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

I did this in a different way (that works on client), but now am reminded why I did it this way. The backend build is failing now, if you check the workflow run. Let me know if there's a better way to avoid this error, other than putting calculated in DataResponse.
Error: Object literal may only specify known properties, and 'calculated' does not exist in type 'DataResponse'.

Copy link
Member

Choose a reason for hiding this comment

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

When you remove it from the schema here, you also need to change the API response which is using this schema to remove the calculated key here:

I made the response of type DataResponse to ensure that the response shape always matches the DataResponse schema. Static analysis is great :)

exports.data = async (req, res: Response<DataResponse>) => {

@jackschedel jackschedel merged commit 3873d80 into master Dec 2, 2024
3 of 4 checks 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.

3 participants