Put Pit Log under version control so the app and sync server can live on git.
This commit is contained in:
commit
1030bac79e
79 files changed
+8463
No files matched your search
@@ -0,0 +1,202 @@
|
||||
package com.racingapp.pitlog.ui.guide
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TopAppBar
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.racingapp.pitlog.ui.PitScroll
|
||||
import com.racingapp.pitlog.ui.SectionLabel
|
||||
import com.racingapp.pitlog.ui.theme.pitTopBarColors
|
||||
|
||||
private data class Tip(val see: String, val doThis: String)
|
||||
|
||||
private data class Move(val change: String, val why: String)
|
||||
|
||||
private data class HandlingCase(val title: String, val moves: List<Move>)
|
||||
|
||||
private val heatTips = listOf(
|
||||
Tip("Middle hottest", "The crown is carrying the load. Pressure is high. Lower the cold pressure so the next hot pressure lands on the tire maker's target."),
|
||||
Tip("Both edges hottest", "The tire is folding. Pressure is low. Add air, and stay inside the tire maker's minimum."),
|
||||
Tip("Right inside much hotter", "Too much negative camber for this roll. Take some out. On asphalt the right-side inside should be only about 5–10° hotter than the outside."),
|
||||
Tip("Right outside hotter", "Not enough negative camber. The outside shoulder is doing the work. Add negative camber on that tire."),
|
||||
Tip("Left inside hotter", "The left tire is leaned the wrong way for an oval. Add positive camber."),
|
||||
Tip("Left outside much hotter", "More positive camber than the tire wants. Take some out. The left-side outside should be about 5–10° hotter than the inside, not a huge spread."),
|
||||
)
|
||||
|
||||
private val order = listOf(
|
||||
Tip("1. Square it", "String the car. Stock mounts can leave the wheelbase off by as much as 3/8 inch, and a quarter inch is enough to feel. Rear end square to the centerline. Right-side contact patches in a line with the right front pointed straight. Recheck after any wheel contact. U-bolts and blocks shift."),
|
||||
Tip("2. Free the suspension", "Upper and lower arms have to move with no bind. The sway bar has to move freely. Space the mounts off the frame, or use a bushing about 1/8 inch larger than the bar, so the bar is not acting as a spring."),
|
||||
Tip("3. Pinion and rear steer", "A leaf spring wraps under power, so the car wants more pinion angle than a coil-spring car. Rear steer to the right is not useful on asphalt. A slight steer to the left only while accelerating can add bite."),
|
||||
Tip("4. Steering", "A stock box is slow and the driver ends up shuffling hands. A quicker box is a consistency item only if the rule book allows it. Keep bump steer small. Do not let the front tires toe against each other in a left turn."),
|
||||
Tip("5. Camber from the tires", "Set static camber so the heat spread above is in range. These books stop the right side at 2 inches and the left at 1 inch, measured with a square at the top of the wheel. A deep street-stock right front, about −6° to −8°, only counts if it still fits that measurement."),
|
||||
Tip("6. Springs and cross", "A leaf-spring car starts around 52–55% crossweight. Keep the front spring split under about 100 lb. The rear roll center on a stock leaf car barely moves, so the front has to be kept from out-rolling it."),
|
||||
Tip("7. Stagger", "Right rear circumference minus left rear, at race pressure. Size it so both rears turn the same number of times through the corner. Extra stagger gets loose on power. Too little drives the front toward the wall."),
|
||||
Tip("8. Brakes", "Keep the entry neutral. Do not use brake bias to hide a tight or loose car."),
|
||||
Tip("9. Aero last", "On a short track, aero is the last gain, and not worth extra drag."),
|
||||
)
|
||||
|
||||
private val handling = listOf(
|
||||
HandlingCase(
|
||||
"Middle, tight",
|
||||
listOf(
|
||||
Move("Take crossweight out.", "Once the car is square and the geometry is honest, a tight middle wants less crossweight."),
|
||||
Move("Less block.", "A taller block under the leaves increases roll and tightens the entry and the middle. Over 3 inches cuts forward bite. String the rear after a block change, because the blocks and U-bolts shift."),
|
||||
Move("Let the front roll closer to the rear.", "A tight middle often means the rear wants to roll more than the front. Soften the right-front spring, or stiffen the left-front. A stiffer left-front does not work well above about 10 degrees of banking."),
|
||||
Move("Read the left-rear temperature.", "If the left rear is the coolest tire, the rear spring split is too large and the right-rear spring is too stiff."),
|
||||
Move("Less bar.", "Less bar if the car is tight. On a leaf-spring Camaro a bigger bar faded after a few laps. If more bar only helps a few laps, put it back and stiffen the front springs."),
|
||||
),
|
||||
),
|
||||
HandlingCase(
|
||||
"Middle, loose",
|
||||
listOf(
|
||||
Move("Add crossweight.", "Once alignment and balance are right, a loose middle wants more crossweight."),
|
||||
Move("More block.", "A taller block tightens the entry and the middle. Stay at 3 inches or under, or forward bite falls off."),
|
||||
Move("Ease a right-rear spring that is much stiffer than the left rear.", "If the front is rolling more than the rear, load piles onto the right rear."),
|
||||
Move("More bar.", "More bar if the car is loose. The bar has to move freely in the stock saddles."),
|
||||
Move("Do not add stagger to make it turn.", "Extra stagger used to free a tight middle shows up as loose off the corner under power."),
|
||||
),
|
||||
),
|
||||
HandlingCase(
|
||||
"Entry, tight",
|
||||
listOf(
|
||||
Move("Less block.", "More block tightens the entry as well as the middle."),
|
||||
Move("Check right-front camber through the dive.", "If the nose dives hard, the right front loses camber and the push starts. Once it starts, it is hard to drive out of. The left front also loses camber in the dive. It wants about 1/2–1° positive while it is loaded. The right-front camber change through the dive and the roll should stay near zero."),
|
||||
Move("Do not fix the entry with brake bias alone.", "Compare a light brake with a hard brake. If they feel the same, bias is not the problem."),
|
||||
),
|
||||
),
|
||||
HandlingCase(
|
||||
"Entry, loose",
|
||||
listOf(
|
||||
Move("More block.", "More block tightens the entry. Keep each block at 3 inches or under."),
|
||||
Move("Move brake bias forward.", "Too much rear brake loosens the car on a hard entry. A usual asphalt split is about 60–65% front and 35–40% rear, if the book allows an adjuster. The adjuster has to be under the dash or the hood, out of the driver's reach, on the tri-state book."),
|
||||
Move("Take out rear steer to the right.", "If the right rear is farther back than the left rear as the car rolls in, the rear is steering right and the car gets loose."),
|
||||
),
|
||||
),
|
||||
HandlingCase(
|
||||
"Exit, tight",
|
||||
listOf(
|
||||
Move("Add stagger for the radius, then leave it.", "Too little stagger for the corner leaves the car tight getting off. On a spool both rear tires turn the same number of times, and stagger steers the middle when the axles are locked. Size it for the radius and the banking, then stop using it as a handling knob."),
|
||||
Move("A locked rear and an open rear are different.", "On a spool or a welded rear, both tires turn the same number of times the whole corner, so stagger steers the middle. An open rear lets the tires turn at different speeds, so stagger does not steer the middle the same way. Wenatchee allows an open rear. Stateline is spool or welded. These books do not allow a Detroit Locker. A rear that unlocks in the middle and locks on power would be sized for the wider exit radius, which wants less stagger than a spool."),
|
||||
Move("More banking wants a little less stagger.", "The same corner on a bank wants less stagger than it would on flat ground. Radius is still the big piece. About 10 degrees is roughly 1.5% less. About 20 degrees is roughly 6% less."),
|
||||
),
|
||||
),
|
||||
HandlingCase(
|
||||
"Exit, loose",
|
||||
listOf(
|
||||
Move("Take the extra stagger out.", "Stagger past what the radius needs makes the car loose on power."),
|
||||
Move("A softer right rear adds bite only as the car squats.", "A right rear about 25 lb softer than the left rear can add exit bite. On a leaf car that is shackles and blocks, not a wedge bolt. Too much of that split tightens the car off. If 25 lb is too much, try 15."),
|
||||
Move("A little rear steer to the left on power can add bite.", "Rear steer to the right does the opposite and loosens the car on exit. On a leaf car this is mostly the axle square and the spring wrap."),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun SetupGuideScreen(onBack: () -> Unit) {
|
||||
Scaffold(
|
||||
topBar = {
|
||||
TopAppBar(
|
||||
title = { Text("Setup") },
|
||||
colors = pitTopBarColors(),
|
||||
navigationIcon = {
|
||||
IconButton(onClick = onBack) {
|
||||
Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = "Back")
|
||||
}
|
||||
},
|
||||
)
|
||||
},
|
||||
) { padding ->
|
||||
PitScroll(padding) {
|
||||
Text(
|
||||
"Leaf-spring Camaro on asphalt. Hobby stock or thunder car. If the rule book disagrees, follow the rule book. Change one thing, write it in the log, and read the tires before the next guess.",
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
SectionLabel("Heat")
|
||||
Text(
|
||||
"Probe inside, middle, outside right after a full-speed run, before the car sits. Same tires, same order, every time. A needle in the tread beats a surface gun. A spread across one tire past about 10% is the one to fix. Temps on a car that is way off are a weak signal until it is at least drivable.",
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
Column(Modifier.padding(top = 8.dp), verticalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
heatTips.forEach { tip ->
|
||||
TipLine(tip.see, tip.doThis)
|
||||
}
|
||||
}
|
||||
SectionLabel("How to tell")
|
||||
Text(
|
||||
"Fix the middle before the entry or the exit. A tight car can feel loose: the driver adds steering, the front bites, and the rear snaps when the throttle comes in. If the wheel is turned farther at speed than on a moderate lap, the car is tight. If it is turned less, it is loose. If you are steering right in the middle, bring it in.",
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
SectionLabel("What to change")
|
||||
Text(
|
||||
"One change, then another run. Skip a move the rule book does not allow.",
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
handling.forEach { item ->
|
||||
Text(
|
||||
item.title,
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
color = MaterialTheme.colorScheme.primary,
|
||||
modifier = Modifier.padding(top = 16.dp),
|
||||
)
|
||||
item.moves.forEach { move ->
|
||||
TipLine(move.change, move.why)
|
||||
}
|
||||
}
|
||||
SectionLabel("Order of work")
|
||||
Text(
|
||||
"Geometry and alignment come before brakes and aero. On a hobby-stock F-body a lot of the geometry is frozen. Do the items the book allows, in this order, and stop when the car is balanced.",
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
order.forEach { tip ->
|
||||
TipLine(tip.see, tip.doThis)
|
||||
}
|
||||
SectionLabel("Where to start")
|
||||
TipLine("Crossweight", "52–55% on a leaf-spring car. Less than a coil car usually wants.")
|
||||
TipLine("Front springs", "Keep the split under about 100 lb. If the front out-rolls the rear, stiffen the front springs and use less bar.")
|
||||
TipLine("Caster", "A short track often wants about 2–4° of split. Left front around 1–2°, right front around 3–5°. More banking wants less caster. A tighter radius wants more split. At mid-turn the wheel should pull slightly, not push back.")
|
||||
TipLine("Blocks", "Under the leaves. More block tightens the entry and the middle. Over 3 inches cuts forward bite. South Sound allows steel leaves, at least four, with blocks, shackles, and sliders. The tri-state book allows steel or poly leaves and shackles.")
|
||||
TipLine("Sway bar", "Less bar if the car is tight. More bar if it is loose. The tri-state book allows a 1-1/4 inch bar in the stock saddles, adjusted with all-thread, no heim joints. South Sound's book does not list a bar.")
|
||||
TipLine("Stagger", "Right rear minus left rear, measured at the cold pressure you will race. More air on the right, or less on the left, grows the stagger before you change tires. More banking wants a little less stagger than the same corner on flat ground.")
|
||||
TipLine("Toe", "1/16 to 1/8 inch out in front on asphalt. A tighter track wants the larger end. Rear wheels straight, no toe. Keep added toe small when the wheel is turned. A quarter-mile only needs about 1/16 inch of added toe. A half-mile needs about 1/64 inch. One degree of Ackermann is about 1/2 inch of toe on an 85-inch tire. Stock boxes add toe in a left turn.")
|
||||
TipLine("String check", "Fronts straight. Mark the floor 10 feet ahead of each spindle. Turn the wheel about as far as the driver does in the corner and mark again. If the left mark moved farther than the right, the car gained toe.")
|
||||
TipLine("Brakes", "About 60–65% on the front. More rear brake loosens a hard entry. If the adjuster ends up slammed to one side, the master-cylinder size or the pads are doing the work the knob cannot do.")
|
||||
TipLine("Lead", "As close to the rule book's left-side maximum as you can, without making the car heavy. One low clump, left of center, near the middle of the car. Splitting the lead front to rear, or left rail to right rail, transfers more in the corner and works the tires harder. Battery and other heavy parts go on the left. Paint the lead white with the car number.")
|
||||
TipLine("Pinion", "A leaf car needs more angle than a coil car because the spring wraps and the pinion rises. Measure pinion versus driveshaft at ride height, car weighted. The U-joint wants at least 1/2° so the needles turn, and most shops want it under 3°. About 2° nose-down from the transmission centerline is a circle-track leaf note so the joints oppose. The 5–7° nose-down figure is a drag-racing launch number.")
|
||||
TipLine("Tires", "Hot pressure has to land within about 0.5 psi of the tire maker's target. The tread, inside middle outside, says whether that tire was high or low once it was hot. Two tires with the same size stamp can still differ by an inch or more around.")
|
||||
SectionLabel("These tracks")
|
||||
Text(
|
||||
"Tri-City Raceway, Stateline Speedway, South Sound Speedway, and Wenatchee Valley Super Oval. Hobby stock or thunder car. A second-generation Camaro is not a Gen 3, so the Gen 3 left-side cap does not apply. The book at that gate wins. A weekly bulletin wins over this page.",
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
TipLine("Camber", "2 inches on the right and 1 inch on the left, measured with a square at the top of the wheel.")
|
||||
TipLine("Tri-state book", "Stateline hobby stock and Wenatchee thunder cars. A second-gen Camaro: 3,200 lb, 55% left maximum, 48% rear maximum, on a stock-dimension engine under 360 cubic inches. Hoosier 970, and the tire you qualify on starts the main. Sway bar 1-1/4 inch maximum, stock saddles, all-thread adjuster. No weight jacks. Pocket spring adjusters, steel or poly leaves, and shackles are allowed. Wenatchee allows an open rear. Stateline is spool or welded. No limited slip and no Detroit Locker. Ride height 5 inches. Lead on 1/2-inch grade 5 bolts.")
|
||||
TipLine("South Sound book", "3,250 lb, 54% left maximum, 49% rear maximum. American Racer take-off slicks. Steel leaves, at least four, with blocks, shackles, and sliders. Open, welded, or a spool. Same 2-inch and 1-inch camber, and the same 5-inch ride height. The book does not list a sway bar.")
|
||||
TipLine("Ride height", "5 inches from the lowest frame at the driver's door.")
|
||||
SectionLabel("Leave these alone")
|
||||
TipLine("Big-bar soft-spring", "A late-model trend. Stockers should not copy it. A bigger bar on a leaf-spring Camaro faded after a few laps.")
|
||||
TipLine("Dirt sheets", "Clay numbers, including a half inch of front toe-out, are for a slick rutted track.")
|
||||
TipLine("Drag pinion", "5–7° nose-down is a hard launch on a soft spring, not an asphalt oval setting.")
|
||||
TipLine("Even temps", "A simulator that wants the inside hottest on every tire is not the paved-oval target above.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun TipLine(title: String, body: String) {
|
||||
Column(Modifier.fillMaxWidth().padding(top = 8.dp)) {
|
||||
Text(title, style = MaterialTheme.typography.titleMedium, color = MaterialTheme.colorScheme.primary)
|
||||
Text(body, color = MaterialTheme.colorScheme.onSurface)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.racingapp.pitlog.ui.guide
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.Card
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.racingapp.pitlog.model.SetupTip
|
||||
|
||||
@Composable
|
||||
fun SetupTipsCard(
|
||||
tips: List<SetupTip>,
|
||||
modifier: Modifier = Modifier,
|
||||
title: String = "From this run",
|
||||
) {
|
||||
if (tips.isEmpty()) return
|
||||
Card(modifier.fillMaxWidth()) {
|
||||
Column(Modifier.padding(16.dp), verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
Text(
|
||||
title,
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
color = MaterialTheme.colorScheme.primary,
|
||||
)
|
||||
tips.forEach { tip ->
|
||||
Column {
|
||||
Text(tip.about, style = MaterialTheme.typography.titleSmall)
|
||||
Text(tip.say, color = MaterialTheme.colorScheme.onSurfaceVariant)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user